Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #6134 > unrolled thread

Re: File access denied after subprocess completion on Windows platform

Started byTim Golden <mail@timgolden.me.uk>
First post2011-05-24 14:09 +0100
Last post2011-05-24 14:09 +0100
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: File access denied after subprocess completion on Windows platform Tim Golden <mail@timgolden.me.uk> - 2011-05-24 14:09 +0100

#6134 — Re: File access denied after subprocess completion on Windows platform

FromTim Golden <mail@timgolden.me.uk>
Date2011-05-24 14:09 +0100
SubjectRe: File access denied after subprocess completion on Windows platform
Message-ID<mailman.2014.1306242549.9059.python-list@python.org>
On 24/05/2011 11:01, Claudiu Nicolaie CISMARU wrote:
> The problem appears when I close the called program (in our case
> calc.exe). The (1) part (the call of os.rename) raise an exception:
>
> <type 'exceptions.WindowsError'>
> (32, 'The process cannot access the file because it is being used by
> another process')
> [Error 32] The process cannot access the file because it is being used
> by another process

Try running procexp to see if it can see what's happening to the
handle. It's possible it's a virus checker / indexer, although
they'd tend to allow the file to be deleted out from under them.
It's not quite clear from your description above whether you
can be sure that the called subprocess has closed all its handles
by the time the os.rename runs.

TJG

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web