module documentation

General purpose utility functions.

Function error Undocumented
Function findClassFromDottedName Looks up a class by full name.
Function parse_path Parse a str path to a Path object using resolve_path().
Function parse_privacy_tuple Parse string like 'public:match*' to a tuple (PrivacyClass.PUBLIC, 'match*').
Function partialclass Bind a class to be created with some predefined __init__ arguments.
Function resolve_path Parse a given path string to a Path object.
Type Variable T Undocumented
def error(msg, *args): (source)

Undocumented

Parameters
msg:strUndocumented
*args:objectUndocumented
Returns
NoReturnUndocumented
def findClassFromDottedName(dottedname, optionname, base_class): (source)

Looks up a class by full name.

Parameters
dottedname:strUndocumented
optionname:strUndocumented
base_class:Union[str, Type[T]]Undocumented
Returns
Type[T]Undocumented
Raises
ValueErrorIf can't find the class.
def parse_path(value, opt): (source)

Parse a str path to a Path object using resolve_path().

Watch out, prints a message and SystemExits on error!

Parameters
value:strUndocumented
opt:strUndocumented
Returns
PathUndocumented
def parse_privacy_tuple(value, opt): (source)

Parse string like 'public:match*' to a tuple (PrivacyClass.PUBLIC, 'match*').

Watch out, prints a message and SystemExits on error!

Parameters
value:strUndocumented
opt:strUndocumented
Returns
Tuple[model.PrivacyClass, str]Undocumented
def partialclass(cls, *args, **kwds): (source)

Bind a class to be created with some predefined __init__ arguments.

Parameters
cls:Type[Any]Undocumented
*args:AnyUndocumented
**kwds:AnyUndocumented
Returns
Type[Any]Undocumented
def resolve_path(path): (source)

Parse a given path string to a Path object.

The path is converted to an absolute path, as required by System.setSourceHref(). The path does not need to exist.

Watch out, prints a message and SystemExits on error!

Parameters
path:strUndocumented
Returns
PathUndocumented

Undocumented

Value
TypeVar('T')