This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author zkfarmer
Recipients amaury.forgeotdarc, benjamin.peterson, facundobatista, georg.brandl, zkfarmer
Date 2008-07-28.13:35:35
SpamBayes Score 0.00014534131
Marked as misclassified No
Message-id <83794ac50807280635i6aa6e070vf0727b337911ec35@mail.gmail.com>
In-reply-to <1217247313.38.0.584279691246.issue3455@psf.upfronthosting.co.za>
Content
Thank you for your reply.I mean I used gvim to open a file. the Python
manual did not specify how to use a file, but said that if a file is to be
used, the deletion of the file will be exception to be raise.so when I use
gvim to open a file, then run os.remove () method to remove the file, the
file is deleted, and no exception to be raise.

2008/7/28 Facundo Batista <report@bugs.python.org>

>
> Facundo Batista <facundo@taniquetil.com.ar> added the comment:
>
> zkfarmer, please try the following from your IDLE:
>
> >>> myfilename = r"c:\tmp\test.txt"
> >>> fh = open(myfilename, "w")
> >>> fh.write("test\n")
> >>> fh.close()
> >>> fh = open(myfilename)
> >>> import os
> >>> os.remove(myfilename)
>
> Traceback (most recent call last):
>  File "<pyshell#6>", line 1, in <module>
>    os.remove(myfilename)
> WindowsError: [Error 32] The process cannot access the file because it
> is being used by another process: 'c:\\tmp\\test.txt'
> >>>
>
> ...and copy here what happened.
>
> Thanks!
>
> ----------
> nosy: +facundobatista
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <http://bugs.python.org/issue3455>
> _______________________________________
>
Files
File name Uploaded
unnamed zkfarmer, 2008-07-28.13:35:31
History
Date User Action Args
2008-07-28 13:35:38zkfarmersetrecipients: + zkfarmer, georg.brandl, facundobatista, amaury.forgeotdarc, benjamin.peterson
2008-07-28 13:35:35zkfarmerlinkissue3455 messages
2008-07-28 13:35:35zkfarmercreate