[Tutor] Delete file before function ends

Adrian Greyling adrian.greyling at gmail.com
Mon Oct 6 20:37:56 CEST 2008

I'll take a peek at the subprocess docs Steve, and see if I can learn
something there...  Thanks for the suggestion!

I'm using WinXP as well Wayne..  Not too sure why yours works, and mine
doesn't..  I'll revisit what I'm doing and also check into Steve's

On Mon, Oct 6, 2008 at 2:30 PM, W W <srilyk at gmail.com> wrote:

> What OS are you using, Adrian? On WinXP, this worked fine:
> import os
> def files():
>     os.startfile('myfile.txt')
>     os.remove('myfile.txt')
> -Wayne
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20081006/6eb13f23/attachment.htm>

More information about the Tutor mailing list