Re: Multithread and locking issue

2020-05-14 Thread Stephane Tougard
On 2020-05-15, Chris Angelico wrote: > Seconded. If you know how many threads you're going to have, just open > that many connections. If not, there's a connection-pooling feature as > part of psycopg2 (if I'm not mistaken). This would be far far easier > to work with than a fragile queueing setu

Re: Multithread and locking issue

2020-05-14 Thread Chris Angelico
On Fri, May 15, 2020 at 9:20 AM Cameron Simpson wrote: > > On 14May2020 22:36, Stephane Tougard wrote: > >A multithreaded software written in Python is connected with a Postgres > >database. To avoid concurrent access issue with the database, it starts > >a thread who receive all SQL request via

Re: Multithread and locking issue

2020-05-14 Thread Stephane Tougard
On 2020-05-14, MRAB wrote: > On 2020-05-14 23:36, Stephane Tougard wrote: >> > Are there 100 threads running execute_sql? Do you put 100 "EXIT" > messages into the queue, one for each thread? Nope, the EXIT comes from the main thread at the very end, once all other threads are dead already and

Re: Multithread and locking issue

2020-05-14 Thread MRAB
On 2020-05-14 23:36, Stephane Tougard wrote: Hello, A multithreaded software written in Python is connected with a Postgres database. To avoid concurrent access issue with the database, it starts a thread who receive all SQL request via queue.put and queue.get (it makes only insert, so no issu

Re: Multithread and locking issue

2020-05-14 Thread Cameron Simpson
On 14May2020 22:36, Stephane Tougard wrote: A multithreaded software written in Python is connected with a Postgres database. To avoid concurrent access issue with the database, it starts a thread who receive all SQL request via queue.put and queue.get (it makes only insert, so no issue with the

Re: Decorators with arguments?

2020-05-14 Thread Cameron Simpson
On 14May2020 08:28, Christopher de Vidal wrote: Help please? Creating an MQTT-to-Firestore bridge and I know a decorator would help but I'm stumped how to create one. I've used decorators before but not with arguments. The Firestore collection.on_snapshot() method invokes a callback and sends i

Multithread and locking issue

2020-05-14 Thread Stephane Tougard
Hello, A multithreaded software written in Python is connected with a Postgres database. To avoid concurrent access issue with the database, it starts a thread who receive all SQL request via queue.put and queue.get (it makes only insert, so no issue with the return of the SQL request). As lon

Fwd: Removing python installation

2020-05-14 Thread Shawn Hoffman
I've somehow wound up in a situation where I have both 3.7.5 and 3.7.6 installed, and the py.exe launcher can find both of them, and defaults to the older one: >py -0p Installed Pythons found by py Launcher for Windows -3.7-64"C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37

Decorators with arguments?

2020-05-14 Thread Christopher de Vidal
Help please? Creating an MQTT-to-Firestore bridge and I know a decorator would help but I'm stumped how to create one. I've used decorators before but not with arguments. The Firestore collection.on_snapshot() method invokes a callback and sends it three parameters (collection_snapshot, changes, a

Re: Subprocess Popen confusion

2020-05-14 Thread Dick Holmes
In article , __pete...@web.de says... > > Dick Holmes wrote: > > > https://occovid19.ochealthinfo.com/coronavirus-in-oc > > > I'm trying to > > communicate using a continuing dialog between two > > processes on the same system. > > I think pexpect > > https://pexpect.readthedocs.io/en/stable

Re: php to python code converter

2020-05-14 Thread Jon Ribbens via Python-list
On 2020-05-14, MRAB wrote: > Look at the date of the original post. It says "8 May 2009". That's over > 11 years ago! > > Since then, Google Code has ceased to exist. Disgraceful, all URLs should continue to work for at least as long as this one has: http://info.cern.ch/hypertext/WWW/TheProject.

Re: PROBLEM WITH PYTHON IDLE

2020-05-14 Thread Mats Wichmann
On 5/14/20 5:15 AM, aduojo samson wrote: > Hello, my name is Samson Haruna and I am from Nigeria.I have a problem with > my python 3.8, any time I click on it to write my python code I get this > error message "IDLE subprocess didn't make connection". I have uninstalled > and reinstalled several ti

Re: PROBLEM WITH PYTHON IDLE

2020-05-14 Thread Souvik Dutta
What is your os? Where have you downloaded it from? What type of package did you download? Souvik flutter dev On Thu, May 14, 2020, 5:36 PM aduojo samson wrote: > Hello, my name is Samson Haruna and I am from Nigeria.I have a problem with > my python 3.8, any time I click on it to write my pytho

Re: php to python code converter

2020-05-14 Thread MRAB
On 2020-05-13 17:53, Palash Bauri wrote: That gives a 404 🤷‍♂️, you sure , you pasted the right link ? ~Palash Bauri On Wed, 13 May 2020, 9:07 pm , wrote: On Friday, 8 May 2009 16:08:25 UTC+5:30, bvidinli wrote: > if anybody needs: > http://code.google.com/p/phppython/ $username = "usernam

PROBLEM WITH PYTHON IDLE

2020-05-14 Thread aduojo samson
Hello, my name is Samson Haruna and I am from Nigeria.I have a problem with my python 3.8, any time I click on it to write my python code I get this error message "IDLE subprocess didn't make connection". I have uninstalled and reinstalled several times, I have even deleted and downloaded a new one

Re: Subprocess Popen confusion

2020-05-14 Thread Terry Reedy
On 5/13/2020 11:13 PM, Dick Holmes wrote: https://occovid19.ochealthinfo.com/coronavirus-in-oc I'm trying to communicate using a continuing dialog between two processes on the same system Try multiprocessing and pipes. -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-lis

[RELEASE] Python 3.8.3 is now available

2020-05-14 Thread Łukasz Langa
On behalf of the entire Python development community, and the currently serving Python release team in particular, I’m pleased to announce the release of Python 3.8.3, the third maintenance release of Python 3.8. You can find it here: https://www.python.org/downloads/release/python-383/

Re: Subprocess Popen confusion

2020-05-14 Thread Peter Otten
Dick Holmes wrote: > https://occovid19.ochealthinfo.com/coronavirus-in-oc > I'm trying to > communicate using a continuing dialog between two > processes on the same system. I think pexpect https://pexpect.readthedocs.io/en/stable/index.html does this naturally, but I don't know if Windows su