section : str
The section to store the name/value in.
encoding : str
- The config file's encoding, defaults to :data:`default_encoding`.
+ The config file's encoding, defaults to :py:data:`default_encoding`.
"""
if encoding == None:
encoding = default_encoding
default :
The value to return if `name` is not set.
encoding : str
- The config file's encoding, defaults to :data:`default_encoding`.
+ The config file's encoding, defaults to :py:data:`default_encoding`.
Examples
--------
"""
def set_preferred_vcs(name):
- """Manipulate :data:`VCS_ORDER` to place `name` first.
+ """Manipulate :py:data:`VCS_ORDER` to place `name` first.
This is primarily indended for testing purposes.
"""
def _get_matching_vcs(matchfn):
"""Return the first module for which matchfn(VCS_instance) is True.
- Searches in :data:`VCS_ORDER`.
+ Searches in :py:data:`VCS_ORDER`.
"""
for submodname in VCS_ORDER:
module = import_by_name('libbe.storage.vcs.%s' % submodname)
def vcs_by_name(vcs_name):
"""Return the module for the VCS with the given name.
- Searches in :data:`VCS_ORDER`.
+ Searches in :py:data:`VCS_ORDER`.
"""
if vcs_name == VCS.name:
return new()
def detect_vcs(dir):
"""Return an VCS instance for the vcs being used in this directory.
- Searches in :data:`VCS_ORDER`.
+ Searches in :py:data:`VCS_ORDER`.
"""
return _get_matching_vcs(lambda vcs: vcs._detect(dir))
def installed_vcs():
"""Return an instance of an installed VCS.
- Searches in :data:`VCS_ORDER`.
+ Searches in :py:data:`VCS_ORDER`.
"""
return _get_matching_vcs(lambda vcs: vcs.installed())
class IDreplacer (object):
"""Helper class for ID replacement in text.
- Reassembles the match elements from :data:`REGEXP` matching
+ Reassembles the match elements from :py:data:`REGEXP` matching
into the original ID, for easier replacement.
See Also
information.
The returned dict will contain a value for "type" (from
- :data:`HIERARCHY`) and values for the levels that are defined.
+ :py:data:`HIERARCHY`) and values for the levels that are defined.
Examples
--------
information.
The returned dict will contain a value for "type" (from
- :data:`HIERARCHY`) and values for the levels that are defined.
+ :py:data:`HIERARCHY`) and values for the levels that are defined.
Notes
-----