This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: .pyw disturb multiprocessing behavior
Type: behavior Stage:
Components: Windows Versions: Python 2.7
process
Status: closed Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: Alex.stein, amaury.forgeotdarc, sbt
Priority: normal Keywords:

Created on 2012-11-29 17:45 by Alex.stein, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (3)
msg176667 - (view) Author: Alex stein (Alex.stein) Date: 2012-11-29 17:45
I made a software synchronizing every 2 seconds files from the network through SSH using Paramiko library.

The software works normally on Linux and Windows 32 and 64 bits (never tried on Mac).

At the office, I use Windows XP 32 bits:
By comfort I made a link on the desktop pointing to the __init__.py file. I had no problems. Then I switched the extension file to .pyw.
The files are not synchronized every 2 seconds anymore but typically some time after 5 minutes. At the restart the files are immediately detected and synchronized.

The software runs multiples threads and processes.

I tryed to update Python interpreter but the bug remains.
msg176670 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2012-11-29 17:59
Unless you give more information, this is unlikely to be a bug in Python.

- Is your program running with Python 2?
- When it runs as a .py file, does it print to the console?
If both answers are yes, keep in mind that there is no console with a .pyw file, and the program will hang when some sys.stdout or sys.stderr buffer is full.
In this case, you could try Python 3 instead, or simply redirect sys.stdout and sys.stderr to a disk file.
msg176835 - (view) Author: Alex stein (Alex.stein) Date: 2012-12-03 11:11
It seems like you’re right. 
I redirect the sys.stdout and the problem is solved. 

Thank you for your help.
History
Date User Action Args
2022-04-11 14:57:38adminsetgithub: 60783
2012-12-03 11:11:22Alex.steinsetstatus: open -> closed

messages: + msg176835
2012-12-02 17:18:33sbtsetnosy: + sbt
2012-11-29 17:59:18amaury.forgeotdarcsetnosy: + amaury.forgeotdarc
messages: + msg176670
2012-11-29 17:45:45Alex.steincreate