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


Groups > comp.lang.python > #73062

Re: os.startfile hanging onto the launched app, or my IDE?

X-Received by 10.236.14.99 with SMTP id c63mr7063675yhc.40.1402352513481; Mon, 09 Jun 2014 15:21:53 -0700 (PDT)
X-Received by 10.50.29.68 with SMTP id i4mr311703igh.0.1402352513382; Mon, 09 Jun 2014 15:21:53 -0700 (PDT)
Path csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!peer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!hw13no5936257qab.0!news-out.google.com!qf4ni19596igc.0!nntp.google.com!h3no521284igd.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups comp.lang.python
Date Mon, 9 Jun 2014 15:21:52 -0700 (PDT)
In-Reply-To <mailman.10860.1402172663.18130.python-list@python.org>
Complaints-To groups-abuse@google.com
Injection-Info glegroupsg2000goo.googlegroups.com; posting-host=76.115.188.33; posting-account=yMP7kQoAAAAXsyJyvL-3qYVslbdYOSQP
NNTP-Posting-Host 76.115.188.33
References <c9c00856-4a8c-4a49-95b7-62d83aa7f2bf@googlegroups.com> <mailman.10860.1402172663.18130.python-list@python.org>
User-Agent G2/1.0
MIME-Version 1.0
Message-ID <bea0fbe0-2ed5-4151-9b00-e46e99bf76cf@googlegroups.com> (permalink)
Subject Re: os.startfile hanging onto the launched app, or my IDE?
From Josh English <Joshua.R.English@gmail.com>
Injection-Date Mon, 09 Jun 2014 22:21:53 +0000
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding quoted-printable
X-Received-Bytes 2743
X-Received-Body-CRC 549547903
Xref csiph.com comp.lang.python:73062

Show key headers only | View raw


On Saturday, June 7, 2014 1:24:43 PM UTC-7, Tim Golden wrote:
>
> I'm not 100% sure what your scenario is, but you can certainly help 
> yourself and us by running the same test on the raw interpreter and then 
> under PyScripter to determine if the behaviour is to do with IDLE or 
> with Python itself.
> 
> My half-guess is that PyScripter starts a new process to run your code, 
> possibly killing any pre-existing process first. That's if I've 
> understood the situation you're describing.
> 
> 
> Could you come back with a little more detail? Specifically: whether 
> what you're seeing happens only from within PyScripter, or only not from 
> within PyScripter, or something else?
> 

I think you're right about PyScripter controlling the process. I don't run scripts through the command line as a matter of practice. 

But I just tried running my script through the command line, with Excel closed, and it opened the Excel file just as I expected. Then I went back to the command line and ran it again, and it didn't close Excel. It gave me the error I was expecting from zipfile not being able to access the file (because it is currently open).

I even left it open and ran another script that also creates and launches an Excel workbook, and it again did not close Excel.

So this quirk is coming from PyScripter, which is a shame, because I don't think it's under development, so it won't be fixed.

Josh

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

os.startfile hanging onto the launched app, or my IDE? Josh English <Joshua.R.English@gmail.com> - 2014-06-06 13:34 -0700
  Re: os.startfile hanging onto the launched app, or my IDE? Tim Golden <mail@timgolden.me.uk> - 2014-06-07 21:24 +0100
    Re: os.startfile hanging onto the launched app, or my IDE? Josh English <Joshua.R.English@gmail.com> - 2014-06-09 15:21 -0700
      Re: os.startfile hanging onto the launched app, or my IDE? Ethan Furman <ethan@stoneleaf.us> - 2014-06-09 15:31 -0700
      Re: os.startfile hanging onto the launched app, or my IDE? Tim Golden <mail@timgolden.me.uk> - 2014-06-10 05:46 +0100
      Re: os.startfile hanging onto the launched app, or my IDE? Ethan Furman <ethan@stoneleaf.us> - 2014-06-10 13:45 -0700
  Re: os.startfile hanging onto the launched app, or my IDE? Ian Kelly <ian.g.kelly@gmail.com> - 2014-06-08 11:56 -0600

csiph-web