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


Groups > comp.lang.python > #101744

Re: problem

Path csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail
From eryk sun <eryksun@gmail.com>
Newsgroups comp.lang.python
Subject Re: problem
Date Fri, 15 Jan 2016 05:27:02 -0600
Lines 18
Message-ID <mailman.6.1452857264.15297.python-list@python.org> (permalink)
References <CAA=K6rnRNccdJRZHtHxg3XWjGvf65Cgacz7exZDEe2fMUfk6Qw@mail.gmail.com> <CACfV+GwZhPjp0MdFuJr3XMSbrs61evJ185zBzJq48J0ki+91iA@mail.gmail.com>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8
X-Trace news.uni-berlin.de 6kQcCgGzA4uAkno7sOtBfQKlGY4DfubNYrx5wyoVD47g==
Return-Path <eryksun@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.008
X-Spam-Evidence '*H*': 0.98; '*S*': 0.00; 'cmd': 0.09; 'exiting': 0.09; 'itself.': 0.11; 'jan': 0.11; 'thu,': 0.15; '.py': 0.16; '2016': 0.16; 'cmd,': 0.16; 'python),': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'wrote:': 0.16; 'creates': 0.18; 'gui': 0.18; 'shell': 0.18; 'versions': 0.20; 'windows': 0.20; 'subject:problem': 0.22; '(or': 0.23; 'header:In-Reply-To:1': 0.24; 'script': 0.25; "doesn't": 0.26; '(e.g.': 0.27; 'message- id:@mail.gmail.com': 0.27; '14,': 0.27; 'andrew': 0.27; 'host': 0.28; 'window': 0.30; 'another': 0.32; 'older': 0.32; 'run': 0.33; 'common': 0.33; 'received:google.com': 0.35; 'instance': 0.35; 'created': 0.36; 'received:209.85': 0.36; '(i.e.': 0.36; 'hosted': 0.36; 'to:addr:python-list': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'client': 0.37; 'received:209.85.213': 0.37; 'received:209': 0.38; 'application': 0.39; 'to:addr:python.org': 0.40; 'close': 0.61; 'different': 0.63; 'inherit': 0.66; 'console,': 0.84; 'respect.': 0.84
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; bh=zdIK6wB3mczzaH5CVwopMgldnf7w16QqkYC/GG3hWB4=; b=h30bMa3+FJJu3D2z0X7AbdYc2aSYeMWNw2ncQ++u9tPj4biB0z0gTZeZRTH6badTun vbLOwlzmBrgE2sInM5jgI7fJLL9u6eYaQXAFr9uF9jkO87qSnDFp/Hy1iCfokkdqDHmW 3mZneILXmMzHl35KjBATHIggD30abcwNtAKjar5YGIgtA6fArdlY3Ouf5lGhIG5vVX+/ tDe3SvtFmz1F1MdflDT8sJnnEibZnS+aPdRDkRm7NwHIqADrGJb0DszOqMMSn86bLACh JrlA/jUl68vOKqQ8/fZuiaY+b6AYXdA6rfeLPF6zVXJb7EQUDDvXIVljfrVS5u0Eu1Rb tPig==
X-Google-DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-type; bh=zdIK6wB3mczzaH5CVwopMgldnf7w16QqkYC/GG3hWB4=; b=KKl8t2vuqXOj1RTFWusCzkKn+mgCFB5L1sMAAbmmm8oaa788ev9pi/RYvhFRrD+MCb 7fxJw4oGTOGBb9XDVUh3kZDgY4JMAKNbF6GMxqYFWQ4lQFTL8R/pFbksPAsIO6p9uYam uZVMn8+6ImxKcRGoiY86/ZGEXLTt1TDf+8dpnmxKcqVNOf3l0yfZozhDjHejw1jW2rP2 KnBxksOh68qXDnGjGGF2xXBMwl0o/Ij0GeJZ+Brng18lsa+J0+mA5R8FP6UiR7i6vP4N eHV8XFeJlid1forN4mxMDpxxBuNeQuBj92jnR3dV//m+NEMohH2kNuJ2UtsXVJBHNtFB kqyQ==
X-Gm-Message-State AG10YOS/rr+hslequ3LNFWsFrcYXAly2YCU9Eudbf7mSm8ZjfPhgeJ7wq9RbU+tLyy0tKkaZGy5zRU9L8kvZ2w==
X-Received by 10.50.61.132 with SMTP id p4mr2635287igr.55.1452857261789; Fri, 15 Jan 2016 03:27:41 -0800 (PST)
In-Reply-To <CACfV+GwZhPjp0MdFuJr3XMSbrs61evJ185zBzJq48J0ki+91iA@mail.gmail.com>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.20+
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>
Xref csiph.com comp.lang.python:101744

Show key headers only | View raw


 On Thu, Jan 14, 2016 at 7:03 PM, Andrew Ongko <andrew.ongko@gmail.com> wrote:
> At least, this way, the cmd doesn't close by itself.

This phrasing may perpetuate a common misconception that the Windows
console is (or is created by) cmd.exe. The cmd.exe shell is just
another console client process, no different from python.exe or
powershell.exe in that respect.

When you run a .py script from a GUI application such as explorer.exe,
Windows creates a console window for python.exe, since it doesn't
inherit one. In Windows 7+, the console window is hosted by an
instance of conhost.exe (i.e. this process has the window procedure
and message loop). Older versions host it in csrss.exe. When
python.exe exits, there's no longer a process attached to the console,
so the console host process also exits. To keep the console window
alive, you can either start python.exe from an existing console
process (e.g. cmd, powershell, or even python), or just before exiting
create a new console process that attaches to the console.

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


Thread

Re: problem eryk sun <eryksun@gmail.com> - 2016-01-15 05:27 -0600

csiph-web