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


Groups > comp.lang.python > #101867

Re: how do I put the python on my desktop or even access it

Path csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail
From eryk sun <eryksun@gmail.com>
Newsgroups comp.lang.python
Subject Re: how do I put the python on my desktop or even access it
Date Sun, 17 Jan 2016 18:45:38 -0600
Lines 42
Message-ID <mailman.82.1453077981.15297.python-list@python.org> (permalink)
References <DUB408-EAS19552177F791097AFA0C686D8CE0@phx.gbl> <569BAD24.4030700@gmail.com> <CACL+1auZHqWrFCny1eDRu+BodMqfBw-f2pQF1=f_qjgWksk1wA@mail.gmail.com> <569C2C5D.2070901@gmail.com>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8
X-Trace news.uni-berlin.de qGSQGFOzTt0VvzmtVny9awjkTgh6ZHLw6beb/oQ1m7iA==
Return-Path <eryksun@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.001
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'newbie': 0.05; 'skip:\\ 20': 0.05; 'overflow': 0.07; 'exception,': 0.09; 'exit.': 0.09; 'icon': 0.09; 'unhandled': 0.09; 'python': 0.10; 'jan': 0.11; 'stack': 0.13; 'subject:python': 0.14; 'suggest': 0.15; '2016': 0.16; 'exited.': 0.16; 'idle.': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'run.': 0.16; 'subject:access': 0.16; 'subject:desktop': 0.16; 'useless': 0.16; 'wrote:': 0.16; 'debugging': 0.18; 'script.': 0.18; 'input': 0.18; 'language': 0.19; '>>>': 0.20; 'windows': 0.20; 'am,': 0.23; 'this:': 0.23; 'thus': 0.24; 'header:In-Reply-To:1': 0.24; "doesn't": 0.26; 'message-id:@mail.gmail.com': 0.27; 'executing': 0.27; 'correct': 0.28; 'attempting': 0.29; 'btw,': 0.29; 'inspect': 0.29; 'code': 0.30; 'programmers': 0.30; 'window': 0.30; 'another': 0.32; 'posting': 0.32; 'run': 0.33; 'michael': 0.33; 'clarify': 0.33; 'doubt': 0.33; 'lets': 0.33; 'open': 0.33; 'changing': 0.34; 'file': 0.34; 'received:google.com': 0.35; 'done': 0.35; 'instance': 0.35; 'something': 0.35; 'but': 0.36; 'received:209.85': 0.36; 'child': 0.36; 'hosted': 0.36; 'to:addr :python-list': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'received:209.85.213': 0.37; 'doing': 0.38; 'itself': 0.38; 'received:209': 0.38; 'why': 0.39; 'whatever': 0.39; 'subject:the': 0.39; 'rather': 0.39; 'to:addr:python.org': 0.40; 'course': 0.62; 'more': 0.63; 'respect': 0.65; 'useful.': 0.72; 'special': 0.73; 'newbie,': 0.84; 'fyi': 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; bh=HIVk0kZklx/DkEzkS+hW8RSkYxfMn5Iy+qbNfSM4KxU=; b=0MNwMvDb8s8JtwTGHMjvifWKZqcMKrJRFJBPzXKzlVAGkzfFptUn1VpaDktDvdMqqZ iMclKqUP60z59cRt1hlQn7EONCHiFtwcVQ/O4yopkv1QJ0Eg8ZOVzdeHJ9/hcIe74kZh 6sU0IOsHaoIvK8o0UzNM48C6gGu2N+MoHxZyT/kIh7WXGpMvs249L3+IifQQkXomf4MD YDnzYHWjoEl2Js0oveYceZcQdSTq4EAulQ/URgEuf9RRuIczHCLtJt2GmLpMbWqODtl6 q2VxFYQzsbDhEYXz+qWF+8mIZZ+5QxTf+z36f3IwG9Mr9Va8jAT2YAdmSCiwUi1WJ4gw aiAA==
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=HIVk0kZklx/DkEzkS+hW8RSkYxfMn5Iy+qbNfSM4KxU=; b=Nuk1zlemIAVPyla4y3wtaues3/e5upjejkMqfxU858wl7lvE2g56sQ5YGwf4QpR9Xn 2NQlZbj0P8nFrfSLKwbIc2Uq6Zm5UU4ibeX+tMdLVS8Mym9Jal52GbBs2sopXKVIo/n7 O2NN4XzXrvySoL5x+A2XCJ+6rABhFJNZncQMq+Px6KpO8kSEUjEt/3chfPi3ikrqPw2q zzwAbl4tSFGFbhf8YR48F64TvlYVRVKRQVt98yjIB+zvBH6LB0U9sgU/D7EMddWCxZ/6 TpykkT4433WxaEqgwa0nKG5/2I1TKbFgVQhdX2o8jFzBSZ3/g8cqWadPZGSF2K6Z/icx l8BQ==
X-Gm-Message-State AG10YOQjtpupZxppW09vKhMCwDobsQSajSYxrWTvpk6rN0NZwPDzcpse7f3/PcLdXMu/Hkg0/OEQuSgHnjInjQ==
X-Received by 10.50.150.7 with SMTP id ue7mr8216919igb.74.1453077978230; Sun, 17 Jan 2016 16:46:18 -0800 (PST)
In-Reply-To <569C2C5D.2070901@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:101867

Show key headers only | View raw


On Sun, Jan 17, 2016 at 6:05 PM, Michael Torrie <torriem@gmail.com> wrote:
> On 01/17/2016 02:46 PM, eryk sun wrote:
>> On Sun, Jan 17, 2016 at 9:03 AM, Michael Torrie <torriem@gmail.com> wrote:
>>>
>>> but if it's a text-mode program you must run it from cmd.exe like this:
>>>
>>> python \path\to\myprogram.py.
>>
>> You only need to run from another console program to keep the window
>> open after Python exits. You can even do that in other ways, but doing
>> that is more complicated than it is useful.
>
> Yes, but then we'll get the OP posting to ask why his python program
> doesn't run. When he double-clicks his Py file it pops up briefly then
> disappears! (Unless the code waits for user input of course).

I was attempting to clarify the language that one "must run it from
cmd.exe". This only needs to be done if you need to keep the window
open after a console program has exited. Also, it doesn't have to be
cmd.exe. You can use powershell.exe, bash.exe, another instance of
python.exe, etc -- any console program that lets you start a child
process and wait for it to exit.

>> BTW, each console window is hosted by an instance of conhost.exe.
>> There's nothing special about cmd.exe with respect to the console.
>
> Of course, but I doubt very many people know about conhost.exe.  And
> conhost.exe is rather useless in and of itself unless you have something
> to run on it.  Thus the usual way to get a console window that you can
> actually work with is to run cmd.exe.  I seriously doubt you would tell
> a newbie to somehow use conhost.exe to run his program.

I often come across even experienced Windows programmers on Stack
Overflow who somehow have drawn the conclusion that cmd.exe *is the
console*. I take whatever opportunity I can get to correct this
misunderstanding with a little FYI note.

For a newbie, I would of course suggest IDLE. I may also suggest
changing the shebang to "#!python3 -i" while debugging a script. They
can double-click on the script's icon to run it, and after it's done
executing or if there's an unhandled exception, they can inspect the
result in the REPL.

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


Thread

Re: how do I put the python on my desktop or even access it eryk sun <eryksun@gmail.com> - 2016-01-17 18:45 -0600

csiph-web