Hi,<br><br>This works fine for me. But the details of IO are very OS dependent. What OS are you using? I am using OS X. Also, please try this in the standard python shell. My feeling is that this is an OS related thing that is independent of IPython.<br>
<br>Cheers,<br><br>Brian<br><br><div class="gmail_quote">On Thu, Jul 30, 2009 at 12:09 PM, Dr. Phillip M. Feldman <span dir="ltr"><<a href="mailto:pfeldman@verizon.net">pfeldman@verizon.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
Try the following:<br>
<br>
f= open('junk','w')<br>
f.write('testing')<br>
f.close()<br>
f<br>
<br>
This last command should generate something like the following:<br>
Out[4]: <closed file 'junk', mode 'w' at 0x023FEB18><br>
<br>
Then try to delete the file junk from outside Python. This should work.<br>
<br>
Phillip<br>
<br>
<br>
nyguy wrote:<br>
><br>
> Perhaps this either a Python or iPython newbie question, but I am unable<br>
> to delete a File that was created by a py file. I follow the<br>
> file.open(blah) and blah.close() conventions within the file.<br>
><br>
> I am able to delete the file if I close out the instance of iPython.<br>
><br>
> Thanks in advance,<br>
><br>
> nyguy<br>
><br>
<font color="#888888"><br>
--<br>
View this message in context: <a href="http://www.nabble.com/Unable-to-delete-files-accessed-by-iPython-tp24227522p24745482.html" target="_blank">http://www.nabble.com/Unable-to-delete-files-accessed-by-iPython-tp24227522p24745482.html</a><br>
Sent from the IPython - User mailing list archive at Nabble.com.<br>
<br>
_______________________________________________<br>
IPython-user mailing list<br>
<a href="mailto:IPython-user@scipy.org">IPython-user@scipy.org</a><br>
<a href="http://mail.scipy.org/mailman/listinfo/ipython-user" target="_blank">http://mail.scipy.org/mailman/listinfo/ipython-user</a><br>
</font></blockquote></div><br>