예제 #1
0
 def FIND_ARTICLE(self):
     # To pass custom settings to CEF, import and update settings dict
     from webview.platforms.cef import settings
     settings.update({
         'persist_session_cookies': True,
     })
     webview.create_window('CEF Example',
                           'https://en.wikipedia.org/wiki/Special:Random')
     webview.start(gui='cef')
예제 #2
0
파일: __main__.py 프로젝트: NiceneNerd/BCML
def configure_cef(debug):
    from webview.platforms.cef import (  # pylint: disable=import-outside-toplevel
        settings, )

    cache = util.get_storage_dir() / "cef_cache"
    settings.update({
        "cache_path": str(cache),
        "context_menu": {
            "enabled": debug,
            "devtools": True
        }
    })
    if not cache.exists():
        cache.mkdir(parents=True, exist_ok=True)
예제 #3
0
파일: app.py 프로젝트: take-i/rd-usb
from threading import Thread
from time import sleep
from urllib import request

from appdirs import user_cache_dir
import webview
from webview.platforms.cef import settings

from utils.config import data_path, Config
from utils.version import version
from web import run, parse_cli

debug = "FLASK_DEBUG" in os.environ

settings.update({
    "log_file": data_path + "/cef.log",
    "cache_path": user_cache_dir("rd-usb", False),
})


class Webview:
    title = None
    width = None
    height = None

    callback = None
    window = None
    loaded = False
    sleep = 0.5

    loading_html = """
        <style>
예제 #4
0
파일: cef.py 프로젝트: ag-pyqt/pywebview
import webview

"""
This example demonstrates how to create a CEF window. Available only on Windows.
"""

# To pass custom settings to CEF, import and update settings dict
from webview.platforms.cef import settings, browser_settings
settings.update({
    'persist_session_cookies': True
})

browser_settings.update({
    'dom_paste_disabled': False
})

if __name__ == '__main__':
    webview.create_window('CEF browser', 'https://pywebview.flowrl.com/hello')
    webview.start(gui='cef')
예제 #5
0
	def __init__(self):
		from webview.platforms.cef import settings
		settings.update({
			'persist_session_cookies': True
		})
		self.guilib = webview.initialize('cef')