Every line of 'run python program online' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your Python code is secure.
36 def _run(): 37 global __file__ 38 import os, sys 39 base = os.environ['RESOURCEPATH'] 40 41 sys.frozen = 'macosx_app' 42 sys.frameworks_dir = os.path.join(os.path.dirname(base), 'Frameworks') 43 sys.new_app_bundle = True 44 sys.site_packages = os.path.join(base, 'Python', 'site-packages') 45 sys.binaries_path = os.path.join(os.path.dirname(base), 'MacOS') 46 sys.console_binaries_path = os.path.join(os.path.dirname(base), 47 'console.app', 'Contents', 'MacOS') 48 49 exe = os.environ.get('CALIBRE_LAUNCH_MODULE', 'calibre.gui2.main') 50 exe = os.path.join(base, 'Python', 'site-packages', *exe.split('.')) 51 exe += '.py' 52 sys.argv[0] = __file__ = exe 53 for arg in list(sys.argv[1:]): 54 if arg.startswith('-psn'): 55 sys.argv.remove(arg) 56 execfile(exe, globals(), globals())
Secure your code as it's written. Use Snyk Code to scan source code in minutes – no build needed – and fix issues immediately. Enable Snyk Code
28 def run_script(): 29 if package_path: 30 os.system('python %s' % os.path.join(package_path, 'ms_bridge_importer.py'))