> Hi,
>
> I use gunicorn in my venv
>
> I have quite few venv that run gunicorn.
>
> I would like to reuse gunicorn for other venv
>
> I launch my web application like this
>
> bash > #PWD = venv dir > source ./bin/activate > gunicorn A_WebApp:app > #A_WebApp is my python file A_WebApp.py >
> I supposes that gunicorn is a shell program ? if yes I should use $PATH ? \
> or gunicorn is a Python program only ? and then what I should do to use gunicorn in another venv ?
>
> Thanks.
I'm looking for a software similar to ZoneMinder \
https://lemmy.ml/post/18530232
But it seem that ZoneMinder become slowly outdated, php etc..
I've found a couples of alternatives ( hard choice as the limitations of use are often buried deep )
It seem that openCV is really famous for AI Computer vision, So I would be surprise if there were no Python program to manage cameras like a ZoneMinder !?
Unleash Your Python Potential with Python IDLE: The Ultimate Beginner's Guide! From Installation Hacks to Secret Debugging Tricks, Master Python IDLE in Minutes! 💻🚀 #Python #Programming #BeginnerGuide
I've been struggling with this for hours, i'm not a python dev, i'm just trying to control my lights with my linux pc #!/usr/bin/env python import sys from lifxlan import LifxLAN def main (): lan =...
I'm just trying to control my smartlights with a script, it seems to be having a lot of problems, I really don't know what I'm doing, i'd appreciate any help I can get
Once I have a script that can individually turn lights on/off i can edit the rest myself, I just can't get the base functionality working.
Hey, I've been looking to learn Python for a while, tried as a kid but got bored before I did anything. I was wondering if anyone knew of any good Python self-study workbooks? The ones with exercises in addition to theory. I'm using Mint, in case that brings up any IDE issues.
In free-threaded builds, running with PYTHON_GIL=0 or -X gil=0 will now disable the GIL. #116322 and #116329 track follow-up work to re-enable the GIL when loading an incompatible extension, and to...
I am working on a new django project which will use a MySQL database. Obviously there are several tables and attributes items in those tables have. I realize I could just document those attributes in the code itself, but more than one codebase may be accessing this database. I would rather have a more comprehensive solution to document relationships, expected CASEing of the text, allowed characters, etc.
I know UML exists, but it seems there are 1,000+ tools which do UML modeling, not all of which will gracefully do an SQL database.
Examples of things I want to document:
For a "user profile" there are various attributes: username (primary key), friendly name, etc
For a "task" - id (primary key), name (letters numbers and spaces only, max 56 characters), owner (a single username (foreign key(), assignees (zero or more usernames (list of foreign keys)), etc
Here's what I need:
GUI for building flowchart/model/whatever you call it showing each table and each attribute in each table, with ability to add notes to table or attribute. Attributes must have ability to be relational just like in a database.
FOSS only, must run on Linux. No "free" web-based garbage that will end up behind a paywall 5 years from now ie draw.io
Must store source files for this model in a text/xml/json/something file which can easily be put into our git repo
Must not be so tightly coupled to MySQL that is requires a database connection to work or couldn't be used if we switch to a non-MySQL backent. If it has templates for and knowledge about MySQL databases that's great but it shouldn't require them to be useful.
Posting for the whole Steering Council, on the subject of @colesbury’s PEP 703 (Making the Global Interpreter Lock Optional in CPython). Thank you, everyone, for responding to the poll on the no-GIL proposal. It’s clear that the overall sentiment is positive, both for the general idea and for PEP 7...
Meta is dedicating 3 engineers to get the nogil patches into cpython. There are some other companies stepping up as well. This is huge this is the closest we have ever been to solving the issue of the GIL.
Hello Python community! There are a lot of resources online targeted at beginners that want to learn Python but very rarely do you see articles talking about moving to Python when you already have tons of experience in other languages like Ruby, and especially, many years of Perl experience and is interested in moving to Python.
I'm not looking for information on how to program in Python, that's really easy to find and most of the learning curve will be learning about the standard libraries and overcoming the years of muscle memory from other languages. I'm looking for information on the following topics:
What's the recommended project structure for a library or a program that'll be distributed via PyPI?
What are the general best practices to follow when writing "clean Python code"?
What's the most commonly followed style guide for the language?
How does import work internally and how does it perform its path lookup for local files (specifically for importing modules internal to a project)?
How to properly set up pyenv for a project? (This one is tricky for me because the Python community loves pyenv and I'm used to having packages globally installed in Ruby and Perl)
I switched from notebook to labs recently and I'm missing how the notebook name is displayed in notebooks. it seems like the only way to know which notebook I'm in now is through the tab, but if I have multiple tabs open it compresses them.
Is there any extension or something that will display the notebook name (and make it easily editable) like in notebooks?
with context() as x:
with Example1(x) as y:
y.use_obj()
```
prints:
start ['hi'] end
However, what I don't like is, let's say that obj is an internal detail of my class. I don't want the user to have to define it beforehand and pass it in.
The only way I can figure how to do this is by calling the context manager's __enter__() explicitly:
I'm setting up a new laptop and considering which of the (many) environment managers to use this time around. My standard has been miniconda, since a big plus for me is the ability to set and download specific python version for different projects all in one tool. I also quite like having global access to different environments (i.e. environments aren't tied to specific projects). I typically have a standard GenDataSci environment always available for initially testing things out, then if I know I'll be continuing as a single project I'll make a stand alone environment for it.
But I've also used poetry for tighter control and reproducibility when I'm actually packaging to publish on PyPI. Hatch looks interesting as well but I can't tell if it includes the ability to have separate python version installs for each environment.
Brendan Metcalfe's intro series to list comprehensions is one of the best I've come across. In addition to showing how to use them, he compares it to other similar methods and shows why LCs can be more effective. Wanted to share his stuff here.
I have a large object that I want to save to the disk because it takes a minute to generate. The OOM reaper kills the process while pickle.dump ing the object.
It's a tuple of dicts of tuple of array.array.
Can pickle dump in chunks? If not, is there another technique I can use?