def start(): with xvfb.autostart(): # FIXME: logs go to nowhere init_qt_app(verbose=False) kernel = IPKernelApp.instance(kernel_class=SplashKernel) kernel.initialize() kernel.kernel.eventloop = loop_qt4 kernel.start()
def start(): with xvfb.autostart(): # FIXME: logs go to nowhere init_qt_app(verbose=False) kernel = IPKernelApp.instance(kernel_class=SplashKernel) kernel.initialize() kernel.kernel.eventloop = loop_qt5 kernel.start()
def main(jupyter=False, argv=None, server_factory=splash_server): if argv is None: argv = sys.argv opts, _ = parse_opts(jupyter, argv) print("masuk") print(opts) if opts.version: print(__version__) sys.exit(0) faulthandler.enable() start_logging(opts) with xvfb.autostart(opts.disable_xvfb, opts.xvfb_screen_size) as x: xvfb.log_options(x) install_qtreactor(opts.verbosity >= 5) log_splash_version() bump_nofile_limit() monitor_maxrss(opts.maxrss) ipnum = opts.ip if hasattr(opts, 'ip') else '0.0.0.0' default_splash_server( portnum=opts.port, ip=ipnum, slots=opts.slots, proxy_profiles_path=opts.proxy_profiles_path, js_profiles_path=opts.js_profiles_path, js_disable_cross_domain_access=not opts.js_cross_domain_enabled, filters_path=opts.filters_path, allowed_schemes=opts.allowed_schemes, private_mode=not opts.disable_private_mode, ui_enabled=not opts.disable_ui, lua_enabled=not opts.disable_lua, lua_sandbox_enabled=not opts.disable_lua_sandbox, lua_package_path=opts.lua_package_path.strip(";"), lua_sandbox_allowed_modules=opts.lua_sandbox_allowed_modules.split( ";"), strict_lua_runner=opts.strict_lua_runner, verbosity=opts.verbosity, max_timeout=opts.max_timeout, argument_cache_max_entries=opts.argument_cache_max_entries, server_factory=server_factory, disable_browser_caches=opts.disable_browser_caches, browser_engines_enabled=opts.browser_engines, dont_log_args=set(opts.dont_log_args), ) signal.signal(signal.SIGUSR1, lambda s, f: traceback.print_stack(f)) if not jupyter: from twisted.internet import reactor reactor.callWhenRunning(splash_started, opts, sys.stderr) reactor.run()
def main(jupyter=False, argv=sys.argv, server_factory=splash_server): opts, _ = parse_opts(jupyter, argv) if opts.version: print(__version__) sys.exit(0) if not jupyter: start_logging(opts) log_splash_version() bump_nofile_limit() with xvfb.autostart(opts.disable_xvfb) as x: xvfb.log_options(x) install_qtreactor(opts.verbosity >= 5) monitor_maxrss(opts.maxrss) if opts.manhole: manhole_server() default_splash_server( portnum=opts.port, slots=opts.slots, proxy_profiles_path=opts.proxy_profiles_path, js_profiles_path=opts.js_profiles_path, js_disable_cross_domain_access=not opts.js_cross_domain_enabled, filters_path=opts.filters_path, allowed_schemes=opts.allowed_schemes, private_mode=not opts.disable_private_mode, ui_enabled=not opts.disable_ui, lua_enabled=not opts.disable_lua, lua_sandbox_enabled=not opts.disable_lua_sandbox, lua_package_path=opts.lua_package_path.strip(";"), lua_sandbox_allowed_modules=opts.lua_sandbox_allowed_modules.split( ";"), strict_lua_runner=opts.strict_lua_runner, verbosity=opts.verbosity, max_timeout=opts.max_timeout, argument_cache_max_entries=opts.argument_cache_max_entries, server_factory=server_factory, ) signal.signal(signal.SIGUSR1, lambda s, f: traceback.print_stack(f)) if not jupyter: from twisted.internet import reactor reactor.callWhenRunning(splash_started, opts, sys.stderr) reactor.run()
def main(): opts, _ = parse_opts() if opts.version: print(__version__) sys.exit(0) start_logging(opts) log_splash_version() bump_nofile_limit() with xvfb.autostart(opts.disable_xvfb) as x: xvfb.log_options(x) install_qtreactor(opts.verbosity >= 5) monitor_maxrss(opts.maxrss) if opts.manhole: manhole_server() default_splash_server( portnum=opts.port, slots=opts.slots, cache_enabled=opts.cache_enabled, cache_path=opts.cache_path, cache_size=opts.cache_size, proxy_profiles_path=opts.proxy_profiles_path, js_profiles_path=opts.js_profiles_path, js_disable_cross_domain_access=not opts.js_cross_domain_enabled, disable_proxy=opts.disable_proxy, proxy_portnum=opts.proxy_portnum, filters_path=opts.filters_path, allowed_schemes=opts.allowed_schemes, private_mode=not opts.disable_private_mode, ui_enabled=not opts.disable_ui, lua_enabled=not opts.disable_lua, lua_sandbox_enabled=not opts.disable_lua_sandbox, lua_package_path=opts.lua_package_path.strip(";"), lua_sandbox_allowed_modules=opts.lua_sandbox_allowed_modules.split(";"), verbosity=opts.verbosity, max_timeout=opts.max_timeout ) signal.signal(signal.SIGUSR1, lambda s, f: traceback.print_stack(f)) from twisted.internet import reactor reactor.callWhenRunning(splash_started, opts, sys.stderr) reactor.run()
def main(): opts, _ = parse_opts() if opts.version: print(__version__) sys.exit(0) start_logging(opts) log_splash_version() bump_nofile_limit() with xvfb.autostart(opts.disable_xvfb) as x: xvfb.log_options(x) install_qtreactor(opts.verbosity >= 5) monitor_maxrss(opts.maxrss) if opts.manhole: manhole_server() default_splash_server( portnum=opts.port, slots=opts.slots, cache_enabled=opts.cache_enabled, cache_path=opts.cache_path, cache_size=opts.cache_size, proxy_profiles_path=opts.proxy_profiles_path, js_profiles_path=opts.js_profiles_path, js_disable_cross_domain_access=not opts.js_cross_domain_enabled, disable_proxy=opts.disable_proxy, proxy_portnum=opts.proxy_portnum, filters_path=opts.filters_path, allowed_schemes=opts.allowed_schemes, ui_enabled=not opts.disable_ui, lua_enabled=not opts.disable_lua, lua_sandbox_enabled=not opts.disable_lua_sandbox, verbosity=opts.verbosity) signal.signal(signal.SIGUSR1, lambda s, f: traceback.print_stack(f)) from twisted.internet import reactor reactor.callWhenRunning(splash_started, opts, sys.stderr) reactor.run()