[Python-Dev] windows buildbot failures (original) (raw)

Tim Peters tim.peters at gmail.com
Sun Apr 23 04:41:27 CEST 2006


[Andrew MacIntyre]

I doubt it has anything to do with this issue, but I just thought I'd mention something strange I've encountered on Windows XP Pro (SP2) at work.

If Python terminates due to an uncaught exception, with stdout & stderr redirected externally (ie within the batch file that started Python),

What batch file?

the files that were redirected to cannot be deleted/renamed until the system is rebooted.

This really needs an executable example. Here's my best guess about what you mean, but I don't see any of what you're describing on WinXP Pro SP2:

""" $ type batty.py import sys

i = 0 for line in sys.stdin: sys.stdout.write(line) i += 1 if i == 3: raise "uncaught exception"

$ type runpy.bat @python batty.py < stdin.txt > stdout.txt 2>stderr.txt

$ type stdin.txt a b c d e f g h i

$ runpy.bat

$ type stdout.txt a b c

$ type stderr.txt batty.py:8: DeprecationWarning: raising a string exception is deprecated raise "uncaught exception" Traceback (most recent call last): File "batty.py", line 8, in raise "uncaught exception" uncaught exception

$ del stdout.txt

$ del stderr.txt

$ dir/b std*.txt stdin.txt """

I'll note that stdin.txt can also be deleted when runpy.bat finishes.

If a bare except is used to trap any such exceptions (and the traceback printed explicitly) so that Python terminates normally, there is no problem (ie the redirected files can be deleted/renamed etc).

I've never reported this as a Python bug

If you do, I'll probably add a comment like the above ;-)

because I've considered the antivirus SW likely to be the culprit.

Could be. FWIW, Norton AV was running during the above.

I don't recall seeing this with Windows 2000, but much was changed in the transition from the Win2k SOE to the WinXP SOE.

What's that? Shitty Out-of-box Experience ;-)?



More information about the Python-Dev mailing list