class Singleton(object): """ Singleton design pattern. """ _instance = None def __init__(self): if self.__class__ is Singleton: raise TypeError("Cannot instantiate directly.") @classmethod def get_instance(cls): """Get the class instance.""" if cls._instance is None: cls._instance = cls() return cls._instance
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
admin | Folder | 0755 |
|
|
daemon | Folder | 0755 |
|
|
exports | Folder | 0755 |
|
|
hardware | Folder | 0755 |
|
|
monitors | Folder | 0755 |
|
|
plugins | Folder | 0755 |
|
|
profiles | Folder | 0755 |
|
|
storage | Folder | 0755 |
|
|
units | Folder | 0755 |
|
|
utils | Folder | 0755 |
|
|
.__init__.pyo.40009 | File | 301 B | 0644 |
|
.consts.pyo.40009 | File | 4.67 KB | 0644 |
|
.exceptions.pyo.40009 | File | 1.22 KB | 0644 |
|
.patterns.pyo.40009 | File | 937 B | 0644 |
|
.version.pyo.40009 | File | 245 B | 0644 |
|
__init__.py | File | 953 B | 0644 |
|
__init__.pyc | File | 301 B | 0644 |
|
__init__.pyo | File | 301 B | 0644 |
|
consts.py | File | 4.4 KB | 0644 |
|
consts.pyc | File | 4.67 KB | 0644 |
|
consts.pyo | File | 4.67 KB | 0644 |
|
exceptions.py | File | 568 B | 0644 |
|
exceptions.pyc | File | 1.22 KB | 0644 |
|
exceptions.pyo | File | 1.22 KB | 0644 |
|
logs.py | File | 3.75 KB | 0644 |
|
logs.pyc | File | 5.6 KB | 0644 |
|
logs.pyo | File | 5.56 KB | 0644 |
|
patterns.py | File | 335 B | 0644 |
|
patterns.pyc | File | 937 B | 0644 |
|
patterns.pyo | File | 937 B | 0644 |
|
version.py | File | 73 B | 0644 |
|
version.pyc | File | 245 B | 0644 |
|
version.pyo | File | 245 B | 0644 |
|