Re: What's wrong on using Popen's communicate method?
eryk sun於 2019年7月6日星期六 UTC+8下午2時13分23秒寫道: > 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:-( Also > > the pywin32 can't be installed for it requires v3.5 and up. > > Major versions of Python support Windows versions that have extended > support from Microsoft at the time of the first release. For Vista, > extended support ended on 2017-04-11. Python 3.6 was released on > 2016-12-23, so it supports Vista. Python 3.7, on the other hand, does > not because it was released on 2018-06-27. I tried the python-3.6.1.exe, downloaded from www.python.org. Its release date is March 21, 2017. But it doesn't run, Vista has no response at all. --Jach > Windows 7 has extended support until 2020-01-14, so 3.8 supports it. > However, system update KB2533623 is required for enhancements to the > system loader that 3.8 depends on for loading extension modules and > DLLs. > > > I finally get a solution to switch between two notepads in Python. Here > > is the codes for someone he may be interested. > > If I have time I'll write a better version since the code you have is > fragile. But I think you should take others' advice to use a > cross-platform GUI automation library, so you won't be locked into a > Windows-only solution. -- https://mail.python.org/mailman/listinfo/python-list
Re: What's wrong on using Popen's communicate method?
On 7/6/19, jf...@ms4.hinet.net wrote: > eryk sun於 2019年7月6日星期六 UTC+8下午2時13分23秒寫道: > >> Major versions of Python support Windows versions that have extended >> support from Microsoft at the time of the first release. For Vista, >> extended support ended on 2017-04-11. Python 3.6 was released on >> 2016-12-23, so it supports Vista. Python 3.7, on the other hand, does >> not because it was released on 2018-06-27. > > I tried the python-3.6.1.exe, downloaded from www.python.org. Its > release date is March 21, 2017. But it doesn't run, Vista has no response at > all. Starting with version 3.5, Python requires the Universal C Runtime, which is an OS component that was introduced in Windows 10 and backported to previous versions, including Windows Vista (service pack 2). Python's installer should attempt to install the CRT update, but from what I've seen this isn't reliable. Ideally, it shouldn't be necessary to manually install the CRT update since Windows Update includes it. Enable optional updates, and keep your system updated. That said, if you can't or won't use Windows Update, then you can download and install standalone updates. CRT Update https://support.microsoft.com/en-us/help/3118401 The above requires Vista service pack 2 (SP2). The system properties dialog should say whether SP1 or SP2 is installed. Your system should be running SP2 if Windows Update is enabled. If you're not even running SP1, you'll have to install SP1 and then SP2. The system properties dialog will tell you whether you're running 32-bit or 64-bit Windows. x86 32-bit SP1 https://www.microsoft.com/en-us/download/details.aspx?id=30 x64 64-bit SP2 https://www.microsoft.com/en-us/download/details.aspx?id=21299 x86 32-bit SP2 https://www.microsoft.com/en-us/download/details.aspx?id=16468 x64 64-bit SP2 https://www.microsoft.com/en-us/download/details.aspx?id=17669 -- https://mail.python.org/mailman/listinfo/python-list
Re: Random signal capture when using multiprocessing
On Sat, Jul 06, 2019 at 04:54:42PM +1000, Chris Angelico wrote: > But if I comment out the signal.signal line, there seem to be no ill > effects. I suspect that what you're seeing here is the multiprocessing > module managing its own subprocesses, telling some of them to shut > down. I added a print call to multiprocessing/popen_fork.py inside > _send_signal (line 53 or thereabouts depending on Python version) and > saw a *lot* of termination signals being sent; only a few actually > triggered the exception message. My guess is that most of the time, > the SIGTERM is smoothly handled as part of the Pool's __exit__ method, > but sometimes the child process is blocked on something, and has to > be told to shut down; and then normally, the signal gets caught and > handled just fine, but since you're explicitly hooking it, you get to > see it. Ok, that makes all the sense in the world, thanks for digging into this. -- José María (Chema) Mateos || https://rinzewind.org/ -- https://mail.python.org/mailman/listinfo/python-list
Re: What's wrong on using Popen's communicate method?
Michael Torrie於 2019年7月6日星期六 UTC+8下午12時02分02秒寫道: > 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 also buy a hard drive and download the ISO from Microsoft and > give it a try. If it works you can buy the license for it (sigh). > > Of course there are also other good alternatives too. Thank you for your suggestion. This PC was purchased in year 2006 from Dell. The CPU is AMD Athlon 64 X2 4000+. I doubt Win10 will support such an old CPU:-) and the chipset driver might be a big problem too. --Jach -- https://mail.python.org/mailman/listinfo/python-list
Re: What's wrong on using Popen's communicate method?
eryk sun於 2019年7月6日星期六 UTC+8下午6時26分42秒寫道: > On 7/6/19, jf...@ms4.hinet.net wrote: > > eryk sun於 2019年7月6日星期六 UTC+8下午2時13分23秒寫道: > > > >> Major versions of Python support Windows versions that have extended > >> support from Microsoft at the time of the first release. For Vista, > >> extended support ended on 2017-04-11. Python 3.6 was released on > >> 2016-12-23, so it supports Vista. Python 3.7, on the other hand, does > >> not because it was released on 2018-06-27. > > > > I tried the python-3.6.1.exe, downloaded from www.python.org. Its > > release date is March 21, 2017. But it doesn't run, Vista has no response at > > all. > > Starting with version 3.5, Python requires the Universal C Runtime, > which is an OS component that was introduced in Windows 10 and > backported to previous versions, including Windows Vista (service pack > 2). Python's installer should attempt to install the CRT update, but > from what I've seen this isn't reliable. > > Ideally, it shouldn't be necessary to manually install the CRT update > since Windows Update includes it. Enable optional updates, and keep > your system updated. That said, if you can't or won't use Windows > Update, then you can download and install standalone updates. > > CRT Update > https://support.microsoft.com/en-us/help/3118401 > > The above requires Vista service pack 2 (SP2). The system properties > dialog should say whether SP1 or SP2 is installed. Your system should > be running SP2 if Windows Update is enabled. If you're not even > running SP1, you'll have to install SP1 and then SP2. The system > properties dialog will tell you whether you're running 32-bit or > 64-bit Windows. > > x86 32-bit SP1 > https://www.microsoft.com/en-us/download/details.aspx?id=30 > x64 64-bit SP2 > https://www.microsoft.com/en-us/download/details.aspx?id=21299 > > x86 32-bit SP2 > https://www.microsoft.com/en-us/download/details.aspx?id=16468 > x64 64-bit SP2 > https://www.microsoft.com/en-us/download/details.aspx?id=17669 According to the info you give, I have done the following steps: 1. Upgrade to SP2 first. 2. Install the CRT update. But the result is still the same, nothing happens after double click the file python-3.6.1.exe. I deeply appreciate your help. It looks like that Vista has to live with Python 3.4 for its rest of life:-) --Jach -- https://mail.python.org/mailman/listinfo/python-list
Re: What's wrong on using Popen's communicate method?
On 7/6/19, jf...@ms4.hinet.net wrote: > > According to the info you give, I have done the following steps: > 1. Upgrade to SP2 first. > 2. Install the CRT update. > But the result is still the same, nothing happens after double click the > file python-3.6.1.exe. Did you reboot after installing the updates? Afterward, did you confirm in the system properties that you're running SP2? Did you check that "%SystemRoot%\System32\ucrtbase.dll" exists, plus a bunch of "api-ms-win-crt-*.dll" DLLs in the same directory? > I deeply appreciate your help. It looks like that Vista has to live with > Python 3.4 for its rest of life:-) That is not true in general for Vista. It's particular to your computer. Check the installer logs in your %TEMP% directory for errors, which will typically be an HRESULT error code that starts with 0x8, such as 0x80070002. Try downloading and installing the 64-bit version: https://www.python.org/ftp/python/3.6.8/python-3.6.8-amd64.exe -- https://mail.python.org/mailman/listinfo/python-list
Re: What's wrong on using Popen's communicate method?
eryk sun於 2019年7月7日星期日 UTC+8上午10時13分34秒寫道: > On 7/6/19, jf...@ms4.hinet.net wrote: > > > > According to the info you give, I have done the following steps: > > 1. Upgrade to SP2 first. > > 2. Install the CRT update. > > But the result is still the same, nothing happens after double click the > > file python-3.6.1.exe. > > Did you reboot after installing the updates? Afterward, did you > confirm in the system properties that you're running SP2? Did you > check that "%SystemRoot%\System32\ucrtbase.dll" exists, plus a bunch > of "api-ms-win-crt-*.dll" DLLs in the same directory? > > > I deeply appreciate your help. It looks like that Vista has to live with > > Python 3.4 for its rest of life:-) > > That is not true in general for Vista. It's particular to your > computer. Check the installer logs in your %TEMP% directory for > errors, which will typically be an HRESULT error code that starts with > 0x8, such as 0x80070002. > > Try downloading and installing the 64-bit version: > > https://www.python.org/ftp/python/3.6.8/python-3.6.8-amd64.exe Yes, it's SP2 showing up in Start->Computer->Properities window. Also in System32 directory, there is ucrtbase.dll and a bunch of api-ms-win-crt-*.dll too. In TEMP, there is only one file "chrome_installer.log" dated at the time of doing the upgrade (strange?, why chrome?). No errors in it. I can't. My Vista is 32bit. Anyway I will give v3.6.8 a try later. --Jach -- https://mail.python.org/mailman/listinfo/python-list
Re: What's wrong on using Popen's communicate method?
On 7/6/19, jf...@ms4.hinet.net wrote: > > In TEMP, there is only one file "chrome_installer.log" dated at the time of > doing the upgrade (strange?, why chrome?). No errors in it. So the installer doesn't even execute. Do you maybe have an anti-malware program that's blocking its execution? Definitely try the 3.6.8 installer. I didn't pay attention to the fact that you were trying to install a very outdated version of 3.6. There may have been bugs in the installer that were fixed. Always use the most recent version possible. -- https://mail.python.org/mailman/listinfo/python-list
Re: What's wrong on using Popen's communicate method?
eryk sun於 2019年7月7日星期日 UTC+8下午12時00分47秒寫道: > On 7/6/19, jf...@ms4.hinet.net wrote: > > > > In TEMP, there is only one file "chrome_installer.log" dated at the time of > > doing the upgrade (strange?, why chrome?). No errors in it. > > So the installer doesn't even execute. Do you maybe have an > anti-malware program that's blocking its execution? Definitely try > the 3.6.8 installer. I didn't pay attention to the fact that you were > trying to install a very outdated version of 3.6. There may have been > bugs in the installer that were fixed. Always use the most recent > version possible. I turn off the anti-virus and tried v3.6.8, get the same result. Usually the anti-virus program will warn me if something was blocked. --Jach -- https://mail.python.org/mailman/listinfo/python-list