File handle not being released by close

Gary Duzan mgi820 at motorola.com
Mon Jul 30 13:27:14 EDT 2007


In article <1185806160.161748.58910 at d55g2000hsg.googlegroups.com>,
 <bg_ie at yahoo.com> wrote:
>
> [ ... ]
>
>for fileName in fileNames:
>  fileBeginning = os.path.splitext(fileName)[0]
>  fileEnd       = os.path.splitext(fileName)[1]
>
>  if fileEnd == ".py":
>    print fileName
>    f=open(fileBeginning+".tmp", 'w')
>    f.write("Hello")
>    f.close
     f.close()

					Gary Duzan
					Motorola CHS





More information about the Python-list mailing list