How to use the eel.chrome function in Eel

To help you get started, we’ve selected a few Eel examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github brentvollebregt / auto-py-to-exe / auto_py_to_exe / __main__.py View on Github external
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)
github samuelhwilliams / Eel / eel / browsers.py View on Github external
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