-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlauncher.py
47 lines (38 loc) · 1.32 KB
/
launcher.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# flake8: noqa
_ = ''
# -- inline cut --
import binascii, json, zlib
_ = json.loads(zlib.decompress(binascii.a2b_base64(_))); exec(_[0], globals())
# -- execable cut --
import types
import sys
sys.modules.setdefault('pybake', types.ModuleType('pybake'))
for name in _[1]:
mod = sys.modules.setdefault('pybake.%s' % name,
types.ModuleType('pybake.%s' % name))
format, content = _[2]['pybake'][name + '.py']
if format == 'base64':
content = binascii.a2b_base64(content)
exec(compile(content,
__file__ + '/pybake/%s' % name + '.py',
'exec'), mod.__dict__)
from pybake.dictfilesystem import DictFileSystem
from pybake.abstractimporter import AbstractImporter
reader = DictFileSystem(__file__, _[2])
importer = AbstractImporter(__file__, reader)
importer.install()
from pybake.dictfilesysteminterceptor import DictFileSystemInterceptor
filesystem = DictFileSystemInterceptor(reader)
filesystem.install()
from pybake.blobserver import BlobServer
BlobServer.check_run()
del binascii, json, zlib
del _
del types, sys
del name, mod, format, content
del DictFileSystem, AbstractImporter, DictFileSystemInterceptor, BlobServer
del reader, importer, filesystem
# -- user init --
# if __name__ == '__main__':
# from foo.cli.main import main
# exit(main())