closing all files when program terminates
Jeff Petkau
jpet at eskimo.com
Sat Nov 4 00:37:57 EST 2000
<jschmitt at vmlabs.com> wrote in message news:8tvibs$7nv$1 at nnrp1.deja.com...
> I run this Python program that creates files. If I use CONTROL-C to
> abort the Python program, I can't delete the files the Python program
> opens. Win2K says that there has been a sharing violation. Is there a
> way to close/release all file resources that have opened when the
> program terminates unexpectedly?
I think it's a problem in Win2K. When a program closes a file, Win2K
sometimes seems to keep it open (and report sharing violations if you
try to use it) for up to 20 seconds or so. This is a problem with lots
of applications, not just Python.
Unfortunately I don't know of any way to turn this ridiculous behavior
off.
--Jeff
More information about the Python-list
mailing list