General utilities.
bmibabel.utils.
cdtemp
(**kwds)[source]¶Bases: object
Context that creates a temporary working directory.
bmibabel.utils.
check_output
(*args, **kwds)[source]¶Execute a shell command.
This is the same as the subprocess.check_output
command available in
Python versions greater than 2.7 but is provided for pre-2.7 versions.
bmibabel.utils.
mktemp
(**kwds)[source]¶Bases: object
Context that creates a temporary directory.
bmibabel.utils.
pkg_config
(name, opts)[source]¶Execute the pkg-config command.
Parameters: | name : str
opts : str or iterable
|
---|---|
Returns: | str
|
bmibabel.utils.
read_first_of
(files)[source]¶Read the first file found.
Parameters: | files : iterable
|
---|---|
Returns: | (str, str)
|
bmibabel.utils.
status
(message)[source]¶Print a status message.
Parameters: | message : str
|
---|
bmibabel.utils.
system
(*args, **kwds)[source]¶Execute and echo a shell command.
Parameters: | verbose : boolean
|
---|
bmibabel.utils.
which
(prog, env=None)[source]¶Look for a program.
Use the system which
command to look for a program. If provided,
env is the name of a environment variable that may give the path to
the program.
Parameters: | prog : str
env : str
|
---|---|
Returns: | str
|