Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #72984
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!xlned.com!feeder3.xlned.com!newsfeed.xs4all.nl!newsfeed3a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <ian.g.kelly@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.041 |
| X-Spam-Evidence | '*H*': 0.92; '*S*': 0.00; 'python,': 0.02; 'happen.': 0.09; 'ide': 0.09; 'imply': 0.09; 'python': 0.11; 'mostly': 0.14; 'changes': 0.15; 'windows': 0.15; '(either': 0.16; 'cleaner': 0.16; 'program?': 0.16; 'tying': 0.16; 'files.': 0.16; 'wrote:': 0.18; 'seems': 0.21; 'shell': 0.22; "i've": 0.25; 'script': 0.25; 'excel': 0.26; 'header:In-Reply-To:1': 0.27; 'external': 0.29; 'thus': 0.29; "doesn't": 0.30; 'message-id:@mail.gmail.com': 0.30; 'josh': 0.31; 'file': 0.32; 'run': 0.32; 'text': 0.33; 'open': 0.33; 'fri,': 0.33; 'guess': 0.33; 'subject:the': 0.34; 'created': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'subject:?': 0.36; 'skip:o 20': 0.38; 'to:addr:python-list': 0.38; 'files': 0.38; 'pm,': 0.38; 'track': 0.38; 'rather': 0.38; 'launch': 0.39; 'sure': 0.39; 'to:addr:python.org': 0.39; 'skip:u 10': 0.60; 'first': 0.61; 'back': 0.62; 'due': 0.66; 'close': 0.67; 'lose': 0.68; 'behavior': 0.77; 'closes': 0.84; 'excel,': 0.84; 'notepad,': 0.84; 'pdfs.': 0.84; 'acrobat': 0.91; 'opens': 0.91 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; bh=+stG5HdV+ySh5zRHQH4bDeLB8s7ChZEN04DNxxCtoEo=; b=cnk0YYdJVYTGU3Zy49/G7zdRKLX4DKYHM8aX3xMEGna79HQ7VGX9oMNnY+XFKLOoxL JmgNoxtmUUPdS9RJ7IfAZgP8BqiWHSsTLdA072RhhPi5XajhoGJf6HTUJyPZhO8s6GHT 3UD1YXBSXZsC6xJsPhTtJRe1365CKnBKsOuwp4SlpHi/gBUJtVSfz1RLKxcLBNB8MO+u BdO8+ZfqiaL3ZtUHUJqVjURgvJCnHZi+YqtvTNzqqiOoJxLFvBJMx5537fVl3pfhcfFL aylj96+7o/aDDPfE77utpPHZCSNBGFl5Hibb9wD/KEdKWPzNQMvOP6HGLqalq8kRzHzj kfTA== |
| X-Received | by 10.236.13.46 with SMTP id a34mr7444924yha.28.1402250236137; Sun, 08 Jun 2014 10:57:16 -0700 (PDT) |
| MIME-Version | 1.0 |
| In-Reply-To | <c9c00856-4a8c-4a49-95b7-62d83aa7f2bf@googlegroups.com> |
| References | <c9c00856-4a8c-4a49-95b7-62d83aa7f2bf@googlegroups.com> |
| From | Ian Kelly <ian.g.kelly@gmail.com> |
| Date | Sun, 8 Jun 2014 11:56:35 -0600 |
| Subject | Re: os.startfile hanging onto the launched app, or my IDE? |
| To | Python <python-list@python.org> |
| Content-Type | text/plain; charset=UTF-8 |
| Content-Transfer-Encoding | quoted-printable |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.10892.1402250686.18130.python-list@python.org> (permalink) |
| Lines | 25 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1402250686 news.xs4all.nl 2923 [2001:888:2000:d::a6]:43752 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:72984 |
Show key headers only | View raw
On Fri, Jun 6, 2014 at 2:34 PM, Josh English <Joshua.R.English@gmail.com> wrote: > I have been using os.startfile(filepath) to launch files I've created in Python, mostly Excel spreadsheets, text files, or PDFs. > > When I run my script from my IDE, the file opens as I expect. But if I go back to my script and re-run it, the external program (either Excel, Notepad, or Acrobat Reader) closes all windows and restarts the program. This can, unfortunately, close other files I am working on and thus I lose all my changes to those files. > > This is happening on Windows 7. > > I am not sure if it is Python (2.7.5) or my IDE (PyScripter 2.5.3). > > It seems like Python or the IDE is keeping track of things created by the os.startfile call, but the docs imply this doesn't happen. > > Is this a quirk of os.startfile? Is there a cleaner way to get Windows to open files without tying back to my program? That sounds unusual. Do you see the same behavior with the shell "start" command? My first guess would be that this is due to some registry setting rather than Python, which pretty much just calls ShellExcecute.
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll 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