Skip to content

How to use pywebview without passing a function/callback to the start method? #1814

@cnlnr

Description

@cnlnr

The mandatory callback/class-based API in pywebview is incredibly frustrating to work with. It unnecessarily fragments linear logic. Is there a way to maintain execution flow without being forced into this 'don't call us, we'll call you' inverted control structure?

import webview


web = webview.start(title='Window Title') # start window


web.load_url('https://pywebview.flowrl.com/hello')
web.evaluate_js()
...


web.ing_exit() or input("Press Enter to exit window")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions