Python Forum

Full Version: GUI Webbrowser
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey guys!

Just a quick question here for you.

I am thinking in creating my own "management center" in python, basically an app that would control most of my windows functions via buttons etc.
Now I am thinking of creating a frame that would encompass an entire website... so basically to have a web browser build inside my app and by default a certain website to be opened when I open my app...something like Wikipedia.org for example.
Is this even possible? Browsing google for an answer but is either me typing in the wrong search words or...I don't know.

Please help if you know the answer.
Quote:Now I am thinking of creating a frame that would encompass an entire website... so basically to have a web browser build inside my app and by default a certain website to be opened when I open my app...something like Wikipedia.org for example.
Yes but how you do it would depend on how you want to do it. What i mean is do you just want the content (text) from wikipedia or do you want to actually embed the page like an iframe? The latter would be more restrictive as you are limited to using a webkit GUI (WxPython or PyQt5), whereas just getting the website content can be as simple as standard libraries at bare minimum.
Quote:basically an app that would control most of my windows functions via buttons etc.
Can be build like a normal web-app with eg with Flask.
I can try to explain a scenario because i guess you have little clue how to do this  Wink
Staring notepad from a web-app,so make a button(HTML-CSS) with name notepad on (client side).
Push this button will call a function on Flask(server side) which has function with Subprocess.
This function start notepad:
import subprocess

subprocess.run(['notepad.exe'])
In Flask it would look something like this:
@app.route('/python_func')
def notepad():
   subprocess.run(['notepad.exe'])
   return 'Notepad start'
As mention bye @metulburr there are webview components in WxPython and PyQt5 or pywebview(like a standalone browser window).
But this stuff dos not make more simpler than what i have explained over.