parse_preference_name function

(Shortest import: from brian2.core.preferences import parse_preference_name)

brian2.core.preferences.parse_preference_name(name)[source]

Split a preference name into a base and end name.

Parameters

name : str

The full name of the preference.

Returns

basename : str

The first part of the name up to the final ..

endname : str

The last part of the name from the final . onwards.

Examples

>>> parse_preference_name('core.default_float_dtype')
('core', 'default_float_dtype')
>>> parse_preference_name('codegen.cpp.compiler')
('codegen.cpp', 'compiler')