aboutsummaryrefslogtreecommitdiffstats
path: root/library/python/runtime_py3/entry_points.py
diff options
context:
space:
mode:
authormonster <monster@ydb.tech>2022-07-07 14:41:37 +0300
committermonster <monster@ydb.tech>2022-07-07 14:41:37 +0300
commit06e5c21a835c0e923506c4ff27929f34e00761c2 (patch)
tree75efcbc6854ef9bd476eb8bf00cc5c900da436a2 /library/python/runtime_py3/entry_points.py
parent03f024c4412e3aa613bb543cf1660176320ba8f4 (diff)
downloadydb-06e5c21a835c0e923506c4ff27929f34e00761c2.tar.gz
fix ya.make
Diffstat (limited to 'library/python/runtime_py3/entry_points.py')
-rw-r--r--library/python/runtime_py3/entry_points.py52
1 files changed, 0 insertions, 52 deletions
diff --git a/library/python/runtime_py3/entry_points.py b/library/python/runtime_py3/entry_points.py
deleted file mode 100644
index 05098723cb..0000000000
--- a/library/python/runtime_py3/entry_points.py
+++ /dev/null
@@ -1,52 +0,0 @@
-import sys
-
-import __res
-
-
-def repl():
- user_ns = {}
- py_main = __res.find('PY_MAIN')
-
- if py_main:
- mod_name, func_name = (py_main.split(b':', 1) + [None])[:2]
- try:
- import importlib
- mod = importlib.import_module(mod_name.decode('UTF-8'))
- user_ns = mod.__dict__
- except:
- import traceback
- traceback.print_exc()
-
- if func_name and '__main__' not in user_ns:
- def run(args):
- if isinstance(args, str):
- import shlex
- args = shlex.split(args)
-
- import sys
- sys.argv = [sys.argv[0]] + args
- getattr(mod, func_name)()
-
- user_ns['__main__'] = run
-
- try:
- import IPython
- except ModuleNotFoundError:
- pass
- else:
- return IPython.start_ipython(user_ns=user_ns)
-
- import code
- code.interact(local=user_ns)
-
-
-def resource_files():
- sys.stdout.buffer.write(b'\n'.join(sorted(__res.resfs_files()) + [b'']))
-
-
-def run_constructors():
- for key, module_name in __res.iter_keys(b'py/constructors/'):
- import importlib
- module = importlib.import_module(module_name.decode())
- init_func = getattr(module, __res.find(key).decode())
- init_func()