Commit 129f97e3 authored by Vincent Pelletier's avatar Vincent Pelletier

ZSQLCatalog.SearchKey: Simplify auto-loading magic.

parent c9d1fbc4
# Automaticaly import all SearchKeys
import os
module_path = os.path.dirname(os.path.abspath(__file__))
global_dict = globals()
__relative_file__ = os.path.basename(__file__)
for filename in os.listdir(module_path):
for filename in os.listdir(os.path.dirname(os.path.abspath(__file__))):
if filename.endswith('.py') and filename != __relative_file__:
modulename = filename[:-3]
try:
module = __import__(modulename, global_dict, None, [])
except ImportError:
continue
__import__(filename[:-3], global_dict, None, [])
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment