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.

Author mj4int
Recipients mj4int
Date 2018-02-22.00:01:28
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1519257688.59.0.467229070634.issue32902@psf.upfronthosting.co.za>
In-reply-to
Content
A pool of threads exists, all of which have started executing.

Thread A has a fileinput object and is currently iterating over the files in "edit in place mode".  For each file, stdout is redirected to the file.  Thread A can call print and write to the file.

Thread B just wants to log some things in the console.  Thread B calls print and... writes to the file thread A is processing.  stdout is hijacked by thread A's fileinput loop.

Whether or not every thread should have an independent evaluation of stdout, certainly a fileinput object shouldn't silently redirect the prints of an innocent bystander thread?

May exist in other python versions, but not checked.
History
Date User Action Args
2018-02-22 00:01:28mj4intsetrecipients: + mj4int
2018-02-22 00:01:28mj4intsetmessageid: <1519257688.59.0.467229070634.issue32902@psf.upfronthosting.co.za>
2018-02-22 00:01:28mj4intlinkissue32902 messages
2018-02-22 00:01:28mj4intcreate