Re: Random signal capture when using multiprocessing

2019-07-05 Thread Chris Angelico
On Sat, Jul 6, 2019 at 12:13 AM José María Mateos wrote: > > Hi, > > This is a minimal proof of concept for something that has been bugging me for > a few days: > > ``` > $ cat signal_multiprocessing_poc.py > > import random > import multiprocessing > import signal > import time > > def signal_ha

Re: What's wrong on using Popen's communicate method?

2019-07-05 Thread eryk sun
On 7/5/19, jf...@ms4.hinet.net wrote: > Terry Reedy於 2019年7月5日星期五 UTC+8上午12時13分25秒寫道: > >> Upgrade to 3.7 or 3.8 to get hundreds of bug fixes, let alone new >> features. Both subprocess and multiprocessing have gotten fixes. > > I can't because my OS is Vista and v3.4 is the last it can run:-( Al

Re: Random signal capture when using multiprocessing

2019-07-05 Thread dieter
José María Mateos writes: > This is a minimal proof of concept for something that has been bugging me for > a few days: > > So basically I have some subprocesses that don't do anything, just sleep for > a few milliseconds, and I capture SIGTERM signals. I don't expect > ... > Running round

Re: What's wrong on using Popen's communicate method?

2019-07-05 Thread Chris Angelico
On Sat, Jul 6, 2019 at 2:03 PM Michael Torrie wrote: > > On 07/05/2019 09:03 PM, jf...@ms4.hinet.net wrote: > > From Vista to Win10? That's a three generation gap! Buy a new PC might > > be a better solution:-) > > Maybe. Windows 10 would probably run okay on that machine. It might be > 10 y

Re: What's wrong on using Popen's communicate method?

2019-07-05 Thread Michael Torrie
On 07/05/2019 09:03 PM, jf...@ms4.hinet.net wrote: > From Vista to Win10? That's a three generation gap! Buy a new PC might be > a better solution:-) Maybe. Windows 10 would probably run okay on that machine. It might be 10 years old, but if it's 64-bit, Win 10 should run on it. You could a

Re: What's wrong on using Popen's communicate method?

2019-07-05 Thread jfong
Chris Angelico於 2019年7月6日星期六 UTC+8上午10時48分10秒寫道: > On Sat, Jul 6, 2019 at 12:31 PM wrote: > > > > Terry Reedy於 2019年7月5日星期五 UTC+8上午12時13分25秒寫道: > > > On 7/3/2019 7:57 PM, jf...@ms4.hinet.net wrote: > > > > I have the test0.py below. I expect to see 'abcd' showing in the > > > > notepad window: >

Re: What's wrong on using Popen's communicate method?

2019-07-05 Thread Chris Angelico
On Sat, Jul 6, 2019 at 12:31 PM wrote: > > Terry Reedy於 2019年7月5日星期五 UTC+8上午12時13分25秒寫道: > > On 7/3/2019 7:57 PM, jf...@ms4.hinet.net wrote: > > > I have the test0.py below. I expect to see 'abcd' showing in the notepad > > > window: > > > - > > > import subprocess as sp > > > p0 = sp.Pop

Re: What's wrong on using Popen's communicate method?

2019-07-05 Thread jfong
Terry Reedy於 2019年7月5日星期五 UTC+8上午12時13分25秒寫道: > On 7/3/2019 7:57 PM, jf...@ms4.hinet.net wrote: > > I have the test0.py below. I expect to see 'abcd' showing in the notepad > > window: > > - > > import subprocess as sp > > p0 = sp.Popen('notepad.exe', stdin=sp.PIPE) > > p0.communicate(inpu

EuroPython 2019: Attendee briefing

2019-07-05 Thread M.-A. Lemburg
EuroPython 2019 will start on Monday. Again we will have more than a thousand attendees signed up and we're looking forward to an exciting conference packed with more than 130 sessions from Monday - Sunday, July 8 - 14. Here's a summary of helpful information for all attendees: 1. Picking up your

Re: Matplotlib import image as float32

2019-07-05 Thread Thomas Jollans
On 01/07/2019 21:08, Markos wrote: > Hi, > > I observed that matplotlib reads an image file (PNG) as float32: > > Please, how to read this file as int8 to get RGB in range of 0-255? You may want to try a different library. scikit-image's imread function will give you the image as an integer arr

Random signal capture when using multiprocessing

2019-07-05 Thread José María Mateos
Hi, This is a minimal proof of concept for something that has been bugging me for a few days: ``` $ cat signal_multiprocessing_poc.py import random import multiprocessing import signal import time def signal_handler(signum, frame): raise Exception(f"Unexpected signal {signum}!") def proc