File handle not being released by close

Jean-Paul Calderone exarkun at divmod.com
Mon Jul 30 16:52:37 CEST 2007


On Mon, 30 Jul 2007 07:36:00 -0700, bg_ie at yahoo.com wrote:
>Hi,
>
> [snip]
>    f=open(fileBeginning+".tmp", 'w')
>    f.write("Hello")
>    f.close
>

You forgot to call close.  Try this final line, instead:

    f.close()

Jean-Paul



More information about the Python-list mailing list