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


Groups > comp.lang.python > #95071

Re: Installation Successful, but pythonw and idle doesn't function

Path csiph.com!optima2.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!1.eu.feeder.erje.net!weretis.net!feeder1.news.weretis.net!news.solani.org!.POSTED!not-for-mail
From Thomas 'PointedEars' Lahn <PointedEars@web.de>
Newsgroups comp.lang.python
Subject Re: Installation Successful, but pythonw and idle doesn't function
Date Thu, 06 Aug 2015 08:56:11 +0200
Organization PointedEars Software (PES)
Lines 57
Message-ID <1972506.uHfIMgh0XK@PointedEars.de> (permalink)
References <mailman.1245.1438807197.3674.python-list@python.org> <2089419.rtOe05Tiyo@PointedEars.de> <mailman.1259.1438824676.3674.python-list@python.org>
Reply-To Thomas 'PointedEars' Lahn <usenet@PointedEars.de>
Mime-Version 1.0
Content-Type text/plain; charset="UTF-8"
Content-Transfer-Encoding 8Bit
X-Trace solani.org 1438844394 18620 eJwFwYEBwCAIA7CXRGhx54Cj/59gAqfxZhAMCGJa12p49T3DWtEdqhyF6Ec7ZIX5XZ9jfD8v2BG6 (6 Aug 2015 06:59:54 GMT)
X-Complaints-To abuse@news.solani.org
NNTP-Posting-Date Thu, 6 Aug 2015 06:59:54 +0000 (UTC)
User-Agent KNode/4.14.2
X-User-ID eJwFwYEBACAEBMCVCk/G+cT+I3QH9e0V5nDDYChXtz/mSX/C0Q5NaemHsGlSb3XN6qyTu0F1ApxiyNhaH3NVFoA=
Cancel-Lock sha1:SLAU6gOsSphVFin3JWD9cVH8bcw=
X-NNTP-Posting-Host eJwFwQcBwEAIBDBL5eEYcpj+JTQBK2mbKFRwuA2UM8Xb+fRh2mwzTA4BqYnYys7uY4V70Q8e0xF+
Xref csiph.com comp.lang.python:95071

Show key headers only | View raw


Terry Reedy wrote:

> On 8/5/2015 6:09 PM, Thomas 'PointedEars' Lahn wrote:
>> Rick Smith wrote:
>>> I also attempted to run "idle", with the following results:
>>>
>>>     C:
>> \Users\judy\AppData\Local\Programs\Python\Python35-32\Lib\idlelib>idle.py
>>>     ** IDLE can't import Tkinter.
>>>     Your Python may not be configured for Tk. **
> 
> Rick, can you run python?  What happens with 'import tkinter'?
> 
>> I do not know IDLE well (if at all after all this time).  Make sure that
>> you have installed the prerequisites.
> 
> A Windows install should install tkinter and Idle together.
> 
>> But it strikes me as odd to run a GUI-based application from the Windows
>> command shell.
> 
> This is the right thing to do when there is a problem, as some error
> messages get delivered to the console.  The prime example is the above.
>   If Idle cannot import tkinter, it cannot use a tkinter message box.

Clarification: It is _not_ the right thing to do to run a GUI-based 
application obviously *written in Python*, like IDLE, *this way*.  Because, 
AISB, usually there is a script that sets up the environment (e.g. the 
PYTHONPATH), and the working directory may matter.

So one should always look for the application shortcut (icon) first, and, if 
found, use its properties to run the application.  In 32-bit Windows, the 
easiest way is to type Windows+R (or, in the Start Menu go to the search 
field, or select the “Run…” command), and type

  cmd /k "cd $WORKDIR & $COMMAND"

which changes to the working directory of the shortcut (replace $WORKDIR 
with what you find there), and if successful executes $COMMAND there (dito), 
while keeping the “Command Prompt” window open because the command shell 
does not exit (it would if you used “/c” instead of “/k”).

>  > Is there not an icon that you can use instead to run it?
> 
> In the start menu, but that error message would not appear.

Yes, the “Run command in shell” checkbox appears to be restricted to 
application icons on real operating systems :->

But you can modify the command of the shortcut to say “cmd /k 
"$ORIGINAL_COMMAND"” to work around this.

-- 
PointedEars

Twitter: @PointedEars2
Please do not cc me. / Bitte keine Kopien per E-Mail.

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


Thread

Installation Successful, but pythonw and idle doesn't function "Rick Smith" <python@activemail.us> - 2015-08-05 16:12 +0000
  Re: Installation Successful, but pythonw and idle doesn't function Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-08-06 00:09 +0200
    Re: Installation Successful, but pythonw and idle doesn't function Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-08-06 00:14 +0200
    Re: Installation Successful, but pythonw and idle doesn't function Terry Reedy <tjreedy@udel.edu> - 2015-08-05 21:31 -0400
      Re: Installation Successful, but pythonw and idle doesn't function Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-08-06 08:56 +0200

csiph-web