Open file dialog | pywebview (v2.4)
Description: Build GUI for your Python program with JavaScript, HTML, and CSS

# # Open file dialog

Create an open file dialog after page content is loaded.

    import webview
    import threading

    def open_file_dialog():
        file_types = ('Image Files (*.bmp;*.jpg;*.gif)', 'All files (*.*)')

        print(webview.create_file_dialog(webview.OPEN_DIALOG,
                                         allow_multiple=True,
                                         file_types=file_types))

    if __name__ == '__main__':
        t = threading.Thread(target=open_file_dialog)
        t.start()

        webview.create_window("Open file dialog example", "https://pywebview.flowrl.com/hello")

Help us improve this page!