diff options
author | Mateu Batle <mbatle@skynet.site> | 2010-09-01 20:09:00 (GMT) |
---|---|---|
committer | Mateu Batle <mbatle@skynet.site> | 2010-09-01 20:09:00 (GMT) |
commit | cbf6202b142c1e6cf82ad0446134ad6f487fe6b4 (patch) | |
tree | 406602e5b98563b801cb2f391db7ce0c2d7905a2 /olpcgames/data/__init__.py |
First commit of math bunny activity
Diffstat (limited to 'olpcgames/data/__init__.py')
-rw-r--r-- | olpcgames/data/__init__.py | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/olpcgames/data/__init__.py b/olpcgames/data/__init__.py new file mode 100644 index 0000000..8510186 --- /dev/null +++ b/olpcgames/data/__init__.py @@ -0,0 +1,36 @@ +"""Design-time __init__.py for resourcepackage + +This is the scanning version of __init__.py for your +resource modules. You replace it with a blank or doc-only +init when ready to release. +""" +try: + __file__ +except NameError: + pass +else: + import os + if os.path.splitext(os.path.basename( __file__ ))[0] == "__init__": + try: + from resourcepackage import package, defaultgenerators + generators = defaultgenerators.generators.copy() + + ### CUSTOMISATION POINT + ## import specialised generators here, such as for wxPython + #from resourcepackage import wxgenerators + #generators.update( wxgenerators.generators ) + except ImportError: + pass + else: + package = package.Package( + packageName = __name__, + directory = os.path.dirname( os.path.abspath(__file__) ), + generators = generators, + ) + package.scan( + ### CUSTOMISATION POINT + ## force true -> always re-loads from external files, otherwise + ## only reloads if the file is newer than the generated .py file. + # force = 1, + ) + |