Python

6527 readers
2 users here now

Welcome to the Python community on the programming.dev Lemmy instance!

📅 Events

PastNovember 2023

October 2023

July 2023

August 2023

September 2023

🐍 Python project:
💓 Python Community:
✨ Python Ecosystem:
🌌 Fediverse
Communities
Projects
Feeds

founded 2 years ago
MODERATORS
1
18
Python 3.14.0 alpha 4 (discuss.python.org)
submitted 6 days ago by norambna to c/python
2
3
 
 

PEP 735 what is it's goal? Does it solve our dependency hell issue?

A deep dive and out comes this limitation

The mutual compatibility of Dependency Groups is not guaranteed.

-- https://peps.python.org/pep-0735/#lockfile-generation

Huh?! Why not?

mutual compatibility or go pound sand!

pip install -r requirements/dev.lock
pip install -r requirements/kit.lock -r requirements/manage.lock

The above code, purposefully, does not afford pip a fighting chance. If there are incompatibilities, it'll come out when trying randomized combinations.

Without a means to test for and guarantee mutual compatibility, end users will always find themselves in dependency hell.

Any combination of requirement files (or dependency groups), intended for the same venv, MUST always work!

What if this is scaled further, instead of one package, a chain of packages?!

4
5
6
10
Libtorrent (lemmy.world)
submitted 1 week ago by [email protected] to c/python
 
 

Hi. I'm trying to install libtorrent but I'm getting an error that I don't know how to resolve. Am I being dumb or is something up?

ERROR: Could not find a version that satisfies the requirement libtorrent (from versions: none) ERROR: No matching distribution found for libtorrent

7
 
 

I'm pretty new to Python because I haven't used it much for many projects over the years, but i decided to use it to make a web app recently with flask to practice. It calls a simple python program that does some file conversion. There's no database.

I'm hosting it on Python Anywhere for free right now. It's for an old TTRPG, so useful for a niche community, but probably not big enough to be worth hosting fees. Just in case, I'd also like to be able to keep an installer on my github or a Dropbox. The hope is others can still grab it, spread it, and install it long after I've lost interest or gotten hit by a bus.

From my googling, I see 3 main options:

  • Path 1: Keep the basic structure of a web app and use one of the frameworks that let me run it in a computer's browser offline.
    • The options here seem to be Flaskwebgui, Electron, or NW.js.
    • This seems the simplest and most straightforward way.
    • Web GUI is ubiquitous nowadays.
    • Part of me also doesn't like that everything has become a web app. I don't even know why. Maybe I don't like the idea of Google controlling everything.
  • Path 2: Keep the basic backend logic but rewrite the web GUI with a desktop GUI, making it more of a true native desktop app.
    • The options here seem to involve using pyinstaller and then some python GUI library/framework like Tkinter, PyQt, PySide, or Dearpygui.
    • I feel this will be slightly more work but it's a super simple UI so remaking it isn't a huge deal.
    • My instincts tell me the end result might be faster, since it won't have to deal with a browser middleman or web routes and such. But, I might be wrong, it might just be my old-ass not used to everything being an electron app nowadays.
    • Might also be more self-contained from carrying it's own libraries and not relying on browser compatibility? Idk.
    • Probably more OS dependent, though. Not sure how easy it is to make it work with PC, Mac, and Linux users.
  • Path 3: There seems to be some way to combine flask and pyinstaller so sounds like a combination of the two is an option, too. Haven't looked into this too much though since most of my search results talked about the above two paths.

So which way is best? And which framework/library/tool in that path?

8
9
10
11
12
22
Python Resources for Everybody (learnbyexample.github.io)
submitted 1 month ago by learnbyexample to c/python
13
25
Python 3.14.0 alpha 3 (discuss.python.org)
submitted 1 month ago by norambna to c/python
14
7
UV tricks (www.bitecode.dev)
submitted 1 month ago by norambna to c/python
15
 
 

cross-posted from: https://mander.xyz/post/21881380

This is my fourth blog post. Any helpful feedback or insights are welcome.

16
17
18
19
20
 
 

Made this ChatGPT coded bot for telegram to propose to my IT Project Manager lady. She said yes.

21
 
 

https://docs.python.org/3/library/pathlib.html

I'm creating this post mainly so that I don't forget the name again.

22
23
 
 

W

24
 
 

My third blog post. I added variation in the tense of the generated text as well as another possible action for the character.

25
 
 

also you can test pynotes and pyclock

view more: next ›