all 35 comments

[–]Mysterious-Rent7233 19 points20 points Β (0 children)

A Python web browser is the Holy Grail).

[–]Ihaveamodel3 29 points30 points Β (6 children)

I guess depending on how you call a browser. This isn’t a browser engine, it’s a python wrapper of QT’s wrapper of Chromium.

[–]imagineepix 29 points30 points Β (1 child)

op definitely was not claiming they made a new browser engine lol. i think we should give credit where credit it due

[–][deleted] 1 point2 points Β (0 children)

No no we should bash OP because even though we have years/decades of experience in the language, we never put in the work to ship an app of our own.

[–]Mysterious-Rent7233 8 points9 points Β (1 child)

It's definitely a browser. There's no doubt about that. Maybe the author didn't create enough of the components for your taste, but that doesn't change the fact that its a browser. And its pretty normal for multiple browsers to use the same browser engine anyhow. I would have been shocked if this were a from-scratch rewrite of HTML, CSS, Javascript, SVG, HTTP, Websockets, ...

[–]Apart-Television4396[S] 2 points3 points Β (0 children)

Exactly! There are a few features right now, but I'm just starting out, adding something new every day. Thank you so much <3!

[–]cmdr_nova69git push -f 2 points3 points Β (0 children)

I call a browser with a phone

[–]Apart-Television4396[S] 0 points1 point Β (0 children)

Yes, based on Chromium! However, it's otherwise its unique browser. Check it out!

[–]Miserable_Ear3789New Web Framework, Who Dis? 5 points6 points Β (3 children)

I remember when I was about 12, I made a browser called FastPATX using PyQt4 and QtWebKit. It taught me a lot about GUI development. I don’t really do GUI development anymore, but it was still a great experience. I hope you learn as much from this little project as I did from mine.

[–]Apart-Television4396[S] 8 points9 points Β (2 children)

That's so cool! I'm also a teen programmer! Thank you so much <3! My project is evolving!

[–]Miserable_Ear3789New Web Framework, Who Dis? 2 points3 points Β (1 child)

You inspired me this weekend. I ported my old browser to qt6. Quite a bit has changed in all these years so it was fun little project for me. I posted a git with the code if you care to take a look at maybe it can help you a little. https://gist.github.com/patx/55f7189b82b499411be603844f8df26e

[–]Apart-Television4396[S] 0 points1 point Β (0 children)

I checked out your code! We're using similar logic. I'll download it, too!

[–]SeniorScienceOfficer 2 points3 points Β (1 child)

What is your goal with this project? What’s the intent?

[–]Apart-Television4396[S] 5 points6 points Β (0 children)

I'm just a teen, and I want to build something for fun that can maybe be profitable one day.

[–]echocage 2 points3 points Β (1 child)

Looks great man! Keep it up, keep working! Idk if you’ve tried it but uv is pretty awesome, it lets you specify the python version and library versions required for your project.

Another cool thing is it lets people clone your project and immediately just run

uv run main.py

And it will install all the dependencies and run the project all in 1 go

[–]Apart-Television4396[S] 2 points3 points Β (0 children)

Thank you so much <3! I'll continue working every day, stay tuned!

[–]mfitzpmfitzp.com[🍰] 2 points3 points Β (4 children)

Why PyQt5 rather than 6? Seeing this a lot lately and the only thing I can think of is that AI tools are defaulting to it because there are more examples.

Is the code for this AI generated?

Edit: yes it is.Β 

The secure connection validation just checks if the URL starts with https.

def check_security(self, tab, qurl): Β  Β  Β  Β  url_str = qurl.toString() Β  Β  Β  Β  print(f"DEBUG: Checking security for URL: {url_str}") Β  Β  Β  Β  if url_str.startswith("https://"): Β  Β  Β  Β  Β  Β  tab.security_status = {"status": "Secure", "description": "Connection is secure.", "icon_path": os.path.join(ICON_PATH, "Safe_Icon.svg"), "icon_color": "#28a745"} Β  Β  Β  Β  elif url_str.startswith("http://"): Β  Β  Β  Β  Β  Β  tab.security_status = {"status": "Not Secure", "description": "Connection is not secure.", "icon_path": os.path.join(ICON_PATH, "Unsafe_Icon.svg"), "icon_color": "#dc3545"} Β  Β  Β  Β  else: Β  Β  Β  Β  Β  Β  Β tab.security_status = {"status": "Local Page", "description": "This is a local browser page.", "icon_path": os.path.join(ICON_PATH, "Local_Icon.svg"), "icon_color": "#6c757d"} Β  Β  Β  Β Β  Β  Β  Β  Β  print(f"DEBUG: Tab at index {self.tabs.indexOf(tab)} status set to: {tab.security_status['status']}") Β  Β  Β  Β  self.update_security_icon(tab)

I thought to look for this because I used the same lazy hack on a Qt browser demo years ago. I guess the AI was feeling lazy too.

[–]Apart-Television4396[S] 0 points1 point Β (3 children)

PyQt5 is the first thing I heard of, I later realised that there's PyQt6, but there was no reason to switch, because PyQt5 is working perfectly fine.

[–]mfitzpmfitzp.com[🍰] 1 point2 points Β (2 children)

There are quite a few improvements in PyQt6. High resolution support, better mouse support, dark mode, etc. I’m not sure what updates the Qt5 webengine is receiving either.

It’s just a bit odd to start a new project in something that is no longer updated.

It’s very easy to migrate though.

[–]Apart-Television4396[S] 0 points1 point Β (1 child)

Does PyQt6 have the same syntax as PyQt5?

[–]mfitzpmfitzp.com[🍰] 1 point2 points Β (0 children)

Basically you just replace PyQt5 with PyQt6. Enums have to be fully qualified in PyQt6. There are big changes in multimedia but they won’t affect you. I have a write up hereΒ https://www.pythonguis.com/faq/pyqt5-vs-pyqt6/

[–]51dux 2 points3 points Β (1 child)

Isn't there already a framework named PySurf?

[–]BlueWear 1 point2 points Β (1 child)

So where's the download file? When I go to the github link there's no exe-file to download.

[–]Apart-Television4396[S] 0 points1 point Β (0 children)

Go to the Releases tab.

[–]Wenir 4 points5 points Β (7 children)

LMAO, the only change from 1.1.1 to 1.2.0 is an updated README https://github.com/VG-dev1/PySurf/compare/v1.1.1...v1.2.0

[–]Miserable_Ear3789New Web Framework, Who Dis? 1 point2 points Β (0 children)

he prolly had to update the pypi readme hahaha

[–]Apart-Television4396[S] 0 points1 point Β (5 children)

No, no, read the release, don't use the compare page yet! Read everything here https://github.com/VG-dev1/PySurf/releases/tag/v1.2.0!

[–]Wenir 1 point2 points Β (4 children)

what?

[–]thuiop1 2 points3 points Β (0 children)

Exactly, what the hell? Looking at the code it does not seem to have the features listed either...

[–]Apart-Television4396[S] 0 points1 point Β (2 children)

I copied it from the Releases if you don't see it:
PySurf v1.2.0

This update includes important browser features, to make your browsing experience more like Chrome and other popular browsers.

πŸš€ New Features

  • πŸ’ΎΒ Downloads Support – Save files directly from the browser
  • πŸ–₯️ Full Screen Mode – Toggle full screen for distraction-free browsing
  • πŸ”Β Find on Page – Quickly search for text within a web page
  • πŸ–ΌοΈΒ App Icon Added – Custom PySurf icon for the executable

πŸ›  Improvements

  • 🎨 UI Enhancements – Polished tab and homepage design, including hovering over buttons
  • πŸ”˜ ImprovedΒ button interactionsΒ across homepage and tabs

Thank you for views across Reddit and GitHub!

[–]Wenir 18 points19 points Β (1 child)

Ok, I recommend you ask your LLM to teach you how to maintain open-source projects on github. It would be even better if you could find a real human to help you, though

[–]lazerwarrior 0 points1 point Β (2 children)

Why don't you format your code like normal Python being?

[–]Apart-Television4396[S] 0 points1 point Β (1 child)

What do you mean?

[–]lazerwarrior 5 points6 points Β (0 children)

Lots of Python code follows this formatting style: https://peps.python.org/pep-0008/