Previous topic

qarbon.release

Next topic

Glossary

This Page

qarbon.util

Helper functions.

Functions

isSequence Determines if the given object is a sequence.
isString Determines if the given object is a string.
moduleDirectory Returns the location of a given module.
moduleImport Import module, returning the module after the last dot.
qarbon.util.isString(obj)[source]

Determines if the given object is a string.

Parameters:obj (object) – the object to be analysed
Returns:True if the given object is a string or False otherwise
Return type:bool
qarbon.util.isSequence(obj, inc_string=False)[source]

Determines if the given object is a sequence.

Parameters:
  • obj (object) – the object to be analysed
  • inc_string (bool) – if False, exclude str/unicode objects from the list of possible sequence objects
Returns:

True if the given object is a sequence or False otherwise

Return type:

bool

qarbon.util.moduleImport(name)[source]

Import module, returning the module after the last dot.

Parameters:name (str) – name of the module to be imported
Returns:the imported module
Return type:module
qarbon.util.moduleDirectory(module)[source]

Returns the location of a given module.

Parameters:module (module) – the module object
Returns:the directory where the module is located
Return type:str