Remove adding interpreter if called from file

This commit is contained in:
Patrick Elmer 2023-08-20 09:03:47 +09:00
parent 0f55dccc9b
commit fb6ad1f08c

View File

@ -38,9 +38,6 @@ def magicli(exclude=['main'], glbls=None, argv=None):
print(glbls['__version__']) if '__version__' in glbls else print('Unknown version.')
exit()
if re.search('\.py$', name):
name = sys.orig_argv[0] + ' ' + name
function_to_call, *commands = [f for f in filter_functions(glbls) if f.__name__ not in exclude]
command_names = [f.__name__ for f in commands]