Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def run(read_arguments=True):
""" Open the interface """
if read_arguments:
check_arguments()
cs.start()
try:
chrome_instance_path = eel.chrome.find_path()
if chrome_instance_path is not None and os.path.exists(chrome_instance_path) and not disable_chrome:
eel.start('main.html', size=(650, 612), port=0)
else:
eel.start('main.html', size=(650, 612), port=0, mode='user selection')
except (SystemExit, KeyboardInterrupt):
pass # This is what the bottle server raises
shutil.rmtree(temporary_directory)
import subprocess as sps
import webbrowser as wbr
import eel.chrome as chm
import eel.electron as ele
import eel.edge as edge
#import eel.firefox as ffx TODO
#import eel.safari as saf TODO
_browser_paths = {}
_browser_modules = {'chrome': chm,
'electron': ele,
'edge': edge}
def _build_url_from_dict(page, options):
scheme = page.get('scheme', 'http')
host = page.get('host', 'localhost')
port = page.get('port', options["port"])
path = page.get('path', '')
return '%s://%s:%d/%s' % (scheme, host, port, path)
def _build_url_from_string(page, options):
base_url = 'http://%s:%d/' % (options['host'], options['port'])
return base_url + page