zero.misc module¶
Miscellaneous functions
-
class
zero.misc.
ChangeFlagDict
(*args, **kwargs)[source]¶ Bases:
dict
Dict with flag which gets set when a change is made after initialisation.
-
class
zero.misc.
Downloadable
(info_stream=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>, progress=True, timeout=None, **kwargs)[source]¶ Bases:
object
Mixin for downloadable URL classes, providing a progress bar.
-
class
zero.misc.
NamedInstance
[source]¶ Bases:
abc.ABCMeta
Metaclass to implement a single named instance pattern
This ensures that there is only ever one instance of a class with a specific name, as provided by the “name” constructor argument.
This is a subclass of ABCMeta so that it can be used as a metaclass of a subclass of an ABCMeta class.
-
class
zero.misc.
Singleton
[source]¶ Bases:
abc.ABCMeta
Metaclass implementing the singleton pattern
This ensures that there is only ever one instance of a class that inherits this one.
This is a subclass of ABCMeta so that it can be used as a metaclass of a subclass of an ABCMeta class.