[IPython-user] Unable to delete files accessed by iPython

Brian Granger ellisonbg.net@gmail....
Thu Jul 30 15:03:51 CDT 2009


Hi,

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.

Cheers,

Brian

On Thu, Jul 30, 2009 at 12:09 PM, Dr. Phillip M. Feldman <
pfeldman@verizon.net> wrote:

>
> Try the following:
>
> f= open('junk','w')
> f.write('testing')
> f.close()
> f
>
> This last command should generate something like the following:
> Out[4]: <closed file 'junk', mode 'w' at 0x023FEB18>
>
> Then try to delete the file junk from outside Python.  This should work.
>
> Phillip
>
>
> nyguy wrote:
> >
> > Perhaps this either a Python or iPython newbie question, but I am unable
> > to delete a File that was created by a py file.  I follow the
> > file.open(blah) and blah.close() conventions within the file.
> >
> > I am able to delete the file if I close out the instance of iPython.
> >
> > Thanks in advance,
> >
> > nyguy
> >
>
> --
> View this message in context:
> http://www.nabble.com/Unable-to-delete-files-accessed-by-iPython-tp24227522p24745482.html
> Sent from the IPython - User mailing list archive at Nabble.com.
>
> _______________________________________________
> IPython-user mailing list
> IPython-user@scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-user/attachments/20090730/4f59d71b/attachment.html 


More information about the IPython-user mailing list