Simple Browser is a minimalist web browser built with Python and PyQt5. It's designed for users who need a distraction-free environment for focused reading, research, or browsing. The emphasis is on maximizing content display and minimizing UI clutter.
- Minimalist Interface: A clean and simple UI with only essential controls visible.
- URL Navigation: Enter a web address in the URL bar to navigate.
- Core Navigation Controls:
- Back
- Forward
- Reload
- Home (navigates to a simple, clean start page)
- Content-Focused Display: Web pages are rendered by the QWebEngineView (based on Chromium's engine), aiming for good compatibility with modern web standards (HTML, CSS, basic JavaScript).
- Dynamic Window Title: The browser window title updates to reflect the title of the current webpage.
- Basic Pop-up Control: Attempts to suppress pop-up windows opened by JavaScript.
- Plugin-Free: Common browser plugins are disabled to maintain a lean environment.
- Basic Error Page: Displays a simple error message if a page fails to load.
- Python 3.x
- PyQt5 and PyQtWebEngine: These Python bindings for the Qt framework are essential.
-
Ensure Python 3 is installed.
-
Install PyQt5 and PyQtWebEngine: Open your terminal or command prompt and run:
pip install PyQt5 PyQtWebEngine
- Note for Linux users: On some Linux distributions, you might need to install additional Qt development packages if
pipdoesn't fully set them up. For example, on Debian/Ubuntu based systems:However, try thesudo apt-get install python3-pyqt5.qtwebengine
pip installcommand first as it often works directly. - Note for Windows/macOS users:
pipusually installs pre-compiled binaries that include the necessary Qt components.
- Note for Linux users: On some Linux distributions, you might need to install additional Qt development packages if
-
Download the Code:
- Place the
simple_browserdirectory (containingbrowser.pyand__init__.py) into your desired project location.
- Place the
-
Open your terminal or command prompt.
-
Navigate to the directory containing the
simple_browserfolder. For example, ifsimple_browseris in/path/to/project/, you should be in/path/to/project/. -
Run the browser application using:
python -m simple_browser.browser
Alternatively, if your
simple_browserdirectory contains amain.pyor similar entry script that imports and runs the browser, you would run that. (The current structure assumes direct execution ofbrowser.pyas the main script).If you are inside the
simple_browserdirectory itself, you can run:python browser.py
- The browser window will open, displaying a simple start page.
- URL Bar: Type or paste a web address into the text field at the top and press
Enterto navigate. - Buttons:
< Back: Navigates to the previous page in your history.Forward >: Navigates to the next page in your history (if you've gone back).Reload: Refreshes the current page.Home: Returns to the initial simple start page.
- Highly Simplified: This browser intentionally lacks many features found in modern commercial browsers, such as:
- Bookmarks
- Detailed history management
- Extensions / Add-ons
- Advanced developer tools
- Complex settings and preferences
- Downloads management (files linked for download might behave unpredictably or try to open externally depending on OS and QtWebEngine defaults).
- JavaScript Pop-ups: While
JavascriptCanOpenWindowsis set tofalse, very persistent or creatively coded JavaScript might still find ways to show overlays or alerts within the page. True immunity is hard. - Ad Blocking: No built-in ad-blocking is implemented in this MVP.
- Security: QWebEngine is based on Chromium and receives security updates, but a custom browser application built on top of it is only as secure as its weakest link and the diligence of its developer. This PoC is not hardened for use in high-risk environments without further security auditing.
- Single Process (Typically): QtWebEngine may use multiple processes under the hood for rendering, but the Python application itself is single-threaded unless explicitly coded otherwise. Very heavy pages could make the UI feel sluggish during load.
your_project_directory/
└── simple_browser/
├── __init__.py # Makes 'simple_browser' a Python package
└── browser.py # The main application script for the browser
└── README_simple_browser.md # This documentation file
- User-configurable home page.
- Basic bookmarking system.
- Tabbed browsing (would increase complexity).
- A dedicated full-screen/content-only mode that hides all UI chrome.
- More robust ad/tracker blocking via request interception.
- Customizable blocklists.
- Basic history accessible via a simple dropdown.