This module defines a custom error type and several utility functions used by Aglyph.
Aglyph is fully logged using the standard logging module, but by default uses a no-op logging handler to suppress log messages. If you want to enable Aglyph logging, define a logger for the “aglyph” log channel in your application, prior to importing any Aglyph modules.
See logging.config for more information about configuring the logging module.
Bases: exceptions.Exception
Raised when Aglyph operations fail with a condition that is not sufficiently described by a built-in exception.
Return True if obj is an importable class or unbound function.
Return the dotted-name string for factory.
factory should be an importable class or unbound function.
The returned dotted-name is a “relative_module.identifier” string for factory that represents a valid import statement according to the following production:
import_stmt ::= "from" relative_module "import" identifier
This function is the inverse of resolve_dotted_name().
Raises TypeError: | |
---|---|
if factory is not a class or unbound function |
Return an identifier string for spec.
If spec is a string, it is returned. Otherwise, spec must be an importable class or unbound function, and its dotted-name is returned (see format_dotted_name()).
Return the class or function identified by dotted_name.
dotted_name must be a “relative_module.identifier” string such that the following production represents a valid import statement with respect to the application’s sys.path:
import_stmt ::= "from" relative_module "import" identifier
This method is the inverse of format_dotted_name().
Raises: |
|
---|