Tim,
I copied your code exactly from my browser and ran it, so I don't
think there was a typo.
I could upgrade to Python 2.5.2 I suppose to compare and contrast, but
I need to support older
Python versions anyway so it's a bit academic...
Your speculation about garbage collection did set me goin
Tim Golden wrote:
geoffbache wrote:
Tim,
Unfortunately my previous message was premature, it seems your
workaround doesn't work
either on my system (Windows XP, Python 2.5.1) I get the following
printed out
Traceback (most recent call last):
File "C:\TextTest\processown.py", line 12, in
geoffbache wrote:
Tim,
Unfortunately my previous message was premature, it seems your
workaround doesn't work
either on my system (Windows XP, Python 2.5.1) I get the following
printed out
Traceback (most recent call last):
File "C:\TextTest\processown.py", line 12, in
os.remove ("filena
geoffbache wrote:
Tim,
Unfortunately my previous message was premature, it seems your
workaround doesn't work
either on my system (Windows XP, Python 2.5.1) I get the following
printed out
Traceback (most recent call last):
File "C:\TextTest\processown.py", line 12, in
os.remove ("filena
Tim,
Unfortunately my previous message was premature, it seems your
workaround doesn't work
either on my system (Windows XP, Python 2.5.1) I get the following
printed out
Traceback (most recent call last):
File "C:\TextTest\processown.py", line 12, in
os.remove ("filename")
WindowsError:
Thanks Tim, very helpful again.
I've now reported this as http://bugs.python.org/issue3210
and implemented your suggested workaround.
Regards,
Geoff
On Jun 25, 9:19 pm, Tim Golden <[EMAIL PROTECTED]> wrote:
> geoffbache wrote:
> > Am currently being very confused over the following code on Windo
geoffbache wrote:
Am currently being very confused over the following code on Windows
import subprocess, os
file = open("filename", "w")
try:
proc = subprocess.Popen("nosuchprogram", stdout=file)
except OSError:
file.close()
os.remove("filename")
Forgot to say: slightly awkward, b
geoffbache wrote:
Am currently being very confused over the following code on Windows
import subprocess, os
file = open("filename", "w")
try:
proc = subprocess.Popen("nosuchprogram", stdout=file)
except OSError:
file.close()
os.remove("filename")
This produces the following excepti
Am currently being very confused over the following code on Windows
import subprocess, os
file = open("filename", "w")
try:
proc = subprocess.Popen("nosuchprogram", stdout=file)
except OSError:
file.close()
os.remove("filename")
This produces the following exception:
Traceback (most