Python code to create a webview in just 3 lines

Posted by

Creating a webview using python

Creating a webview using python can be achieved in just 3 lines of code. Here’s how:


import tkinter as tk
from tkinter import *
import webview

webview.create_window('Hello world', 'https://www.example.com')

0 0 votes
Article Rating
4 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
@pedrojosuesalomao
6 months ago

thanks

@sidarth404
6 months ago

can you please tell this pywebview how to compile to apk.

@sidarth404
6 months ago

error occurs " from android.runnable import run_on_ui_thread as run_thread

ModuleNotFoundError: No module named 'android'
"

@siddarth26
6 months ago

Its not working