Single Tabbed browser in Python

A PHP Error was encountered

Severity: Warning

Message: strtotime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone.

Filename: blog/post_details.php

Line Number: 38

Backtrace:

File: /home/solutio1/public_html/application/views/blog/post_details.php
Line: 38
Function: strtotime

File: /home/solutio1/public_html/application/controllers/Blog.php
Line: 14
Function: view

File: /home/solutio1/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone.

Filename: blog/post_details.php

Line Number: 38

Backtrace:

File: /home/solutio1/public_html/application/views/blog/post_details.php
Line: 38
Function: date

File: /home/solutio1/public_html/application/controllers/Blog.php
Line: 14
Function: view

File: /home/solutio1/public_html/index.php
Line: 315
Function: require_once

2019-09-04
Shashank Dharasurkar Download Code

            Hello guys, today we are going to create a simple web browser using python and other gui supported libraries available in python so lets start.

            For making simple single tabbed web browser we need PySide library installed in your machine. So if its installed then start with coding or if its not installed just install it via pip command as shown below

pip install pyside       or        pip3 install pyside 

(Note: You should know that python version 3.x uses pip3 instead of pip)

After entering above command on terminal pyside will get installed on your machine. After installation completed lets start with coding.

import sys

from PySide.QtCore import *

from PySide.QtGui import *

from PySide.QtWebKit import *

app = QApplication(sys.argv)

web = QWebView()

web.load(QUrl("http://gmail.com"))

web.show()

 

Just copy the above code and paste it with name browser.py or simply type code on terminal.  After saving the browser.py file open command prompt and navigate to the folder you just saved .py file and simply enter the command as given below.

 

python browser.py

 

After executing above file a new window will popup like this.  If you have stable internet connection it will open the desired website quickly otherwise it will take time. Here I am passing www.gmail.com as default url so it will open Gmail’s Home page like this.

 

browser_result

 

So, try it with yourself and if any error or problem appears feel free to comment in comment section we will try to solve your problem as soon as possible.

Thank You.     Happy coding..


About author

Card image cap
Shashank Dharasurkar

I’m a full-stack developer, with a fundamental knowledge of programming experience on Computer Vision and Automation like Opencv, python-Gui, python and Interested in computers and machine learning and also likes to write about it!!

-Python Developer

0 Comments