Message70344
zkfarmer, please try the following from your IDLE:
>>> myfilename = r"c:\tmp\test.txt"
>>> fh = open(myfilename, "w")
>>> fh.write("test\n")
>>> fh.close()
>>> fh = open(myfilename)
>>> import os
>>> os.remove(myfilename)
Traceback (most recent call last):
File "<pyshell#6>", line 1, in <module>
os.remove(myfilename)
WindowsError: [Error 32] The process cannot access the file because it
is being used by another process: 'c:\\tmp\\test.txt'
>>>
...and copy here what happened.
Thanks! |
|
Date |
User |
Action |
Args |
2008-07-28 12:15:13 | facundobatista | set | recipients:
+ facundobatista, georg.brandl, amaury.forgeotdarc, benjamin.peterson, zkfarmer |
2008-07-28 12:15:13 | facundobatista | set | messageid: <1217247313.38.0.584279691246.issue3455@psf.upfronthosting.co.za> |
2008-07-28 12:15:12 | facundobatista | link | issue3455 messages |
2008-07-28 12:15:10 | facundobatista | create | |
|