[Python-Dev] Re: FWD: Re: Problem w/ IDLE on Win2000

Kurt B. Kaiser kbk at shore.net
Thu Aug 7 03:29:36 EDT 2003

"Tim Peters" <tim.one at comcast.net> writes:

> The real problem <wink> is that there shouldn't be a problem here at all.
> The shortcut the installer creates to launch IDLE is fine, spaces or not,
> and, e.g., the similar shortcut created to launch the Tk-based pydoc GUI
> works fine if you install Python into a path with embedded spaces.  

Yes, I installed Python23 in Program Files and it will start only if
I change the shortcut by appending the -n switch, which causes IDLE to
start w/o the subprocess, as in days of yore.

> I don't know why IDLE fails to start up, just that the reason isn't
> obvious.  IDLE in 2.2 did start up, spaces or not.  IDLE in 2.3 is
> very different.  I *suspect* 2.3 IDLE is getting screwed by building
> a command line for spawn that isn't robust against embedded path
> whitespace.

Something like that, no doubt.


> I have no evidence of an MS bug here.  


> My sisters like putting spaces in file names, which is why MS
> started allowing them.  The backward compatibility problem then was
> severe, especially given system shells with weak and inconsistent
> quoting gimmicks.  

C:\>"Progam Files"\Python23\python  f:\"My Documents"\Python\animal.py
Program Files\Python23\python:  can't open file 'f:\My'

C:\>"Progam Files"\Python23\python  "f:\My Documents\Python\animal.py"


> Python doesn't try to hide this on Windows, and using spawn() or
> system() successfully from Python on Windows requires that you deal
> with whitespace in the executable's path yourself.

>From a command window:

C:\>"Program Files"\Python23\python  "\Program Files\Python23\Lib\idlelib\idle.py"
C:\Program: Can't open 'Files\Python23\python.exe'


Quoting the entire first phase gives the same result.

C:\>PROGRA~1\Python23\python  "\Program Files\Python23\Lib\idlelib\idle.py"

will start IDLE with the subprocess.

In other universes this would be laughable.  I assume the attempt to
spawn is responsible for that error message, and the python executable
can't be located, but I haven't got that far yet.  It leaves a
partially started (and stuck) user process behind.

This is not an MS bug and nothing can go wrong go wrong go rwong


More information about the Python-Dev mailing list