diff options
| author | mikeos <mike.osipov@gmail.com> | 2013-09-30 22:11:41 +0400 |
|---|---|---|
| committer | mikeos <mike.osipov@gmail.com> | 2013-09-30 22:23:41 +0400 |
| commit | 6f6c2754c4b73946eab3faa4dc7e9e672eb373b8 (patch) | |
| tree | 3daa8109c4c0d5978a1aa83112b4dafdebe52cde /formats/__init__.py | |
| parent | 0ae5a430e4f92ee7bf9e458cf584a0a12fd5c25a (diff) | |
setup.py
Diffstat (limited to 'formats/__init__.py')
| -rw-r--r-- | formats/__init__.py | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/formats/__init__.py b/formats/__init__.py deleted file mode 100644 index 60a35fc..0000000 --- a/formats/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -import os - -path = os.path.dirname(__file__) or "." - -__formats = {} - -for entry in sorted(os.listdir(path)): - if not entry.endswith(".py") or entry.startswith("_"): - continue - - modname = entry.replace(".py", "") - mod = __import__(modname, globals(), locals(), ["init"], 1) - fmt = mod.init() - __formats[fmt.name] = fmt - -def supported(): - return sorted(__formats.keys()) - -def issupported(name): - return name in __formats - -def handler(name, logger = None): - return __formats.get(name)(logger) |
