Python

25 readers
1 users here now

A community for talking about the Python programming language.

founded 1 year ago
MODERATORS
1
 
 

So I made a small little command-line utility for myself just for practice, but I had a hard time figuring out how to actually turn it into something I can just use on the command line with no fuss. It uses a virtual environment as Python packages should, so it needs to be run in that environment and I was having trouble figuring out how to do it.

But then I remembered that pipx runs application in a virtual environment, and after checking the docs, I found out that it allows installing local packages by just pointing install at the package directory. So I did, and after setting up the command name as a project script that points to main it ended up working.

I haven't ever heard of anyone doing something like this for a personal program though. Is something like this a bad idea? Is it over engineering or error prone? Is there another way that most people do something like this?

2
 
 

cross-posted from: https://programming.dev/post/21515

Some surprising, but valid, python syntax examples.

3
 
 

I learned a little bit of python back in college with the hope that it would give me a competitive edge in the field I hoped to enter. Lo and behold, I got a job in a different industry entirely and any knowledge of coding I once had became irrelevant.

Would it be worth it to pick up my python textbook again and self-teach in my free time if I don't want to make a career of coding? What exactly can python be used to create?

4
 
 

With r/python out for the next 48 hours, here’s a post to promote continuing discussion a language we all love. Python.

5
 
 

I was playing a bit with the nogil version of Python 3.12. In theory it should have large gains for multi threaded workloads (at the expense of single threaded workloads).

Has anyone given it a try?

https://github.com/colesbury/nogil-3.12