On Wed, May 14, 2008 at 8:18 AM, Gabriel Genellina
<gagsl-py2@yahoo.com.a rwrote:
Yes, it's a function
That doesn't help either.
When I've rewrite code something like that:
with open(backup_fil e_name, 'w') as backup_file:
.....
filter.parse('< updated file name>')
del input, output, filter
os.remove(proje ct.get_vcproj() )
os.rename(backu p_file_name, project.get_vcp roj())
It triggers WindowsError on os.remove()
<gagsl-py2@yahoo.com.a rwrote:
En Tue, 13 May 2008 11:57:03 -0300, Dmitry Teslenko <dteslenko@gmai l.com>
Is the code above contained in a function? So all references are released
upon function exit?
Is the code above contained in a function? So all references are released
upon function exit?
If not, you could try using: del input, output, filter
That should release all remaining references to the output file, I presume.
Or locate the inner reference to the output file (filter.somethi ng perhaps?)
and explicitely close it.
That should release all remaining references to the output file, I presume.
Or locate the inner reference to the output file (filter.somethi ng perhaps?)
and explicitely close it.
When I've rewrite code something like that:
with open(backup_fil e_name, 'w') as backup_file:
.....
filter.parse('< updated file name>')
del input, output, filter
os.remove(proje ct.get_vcproj() )
os.rename(backu p_file_name, project.get_vcp roj())
It triggers WindowsError on os.remove()