[Distutils] Problems with cli.exe

Phillip J. Eby pje at telecommunity.com
Mon Aug 21 22:41:46 CEST 2006


At 04:32 PM 8/21/2006 -0400, Jim Fulton wrote:

>I've found a bug with cli.exe and a missing feature.
>
>The bug is that arguments containing embedded spaces aren't handled
>correctly.
>For example, suppose you have foo-script.py and a copy of cli.exe
>named foo.exe.
>If you call foo.exe with a single argument, like this:
>
>    foo "a b"
>
>then foo-script.py will be called with 2 arguments, "a", and "b",
>rather than a single argument, "a b".
>
>The missing feature is that options on the #! line aren't honored. It
>would be nice if, for example, a script beginning like:
>
>    #!\Python24\python.exe -O
>
>would run Python in optimized mode.
>
>I'd be happy to take a crack at fixing the bug and adding the
>feature.

Thanks!  Please watch out for making sure that the following are still 
supported after your changes:

* Non-ASCII paths to python.exe
* Embedded spaces in the path to python.exe


>Where is the source?

launcher.c in the root of the setuptools checkout.


>I assume that this also applies to gui.exe.

Yes; both are compiled from the same source.


>BTW, Shouldn't the setuptools project be moved out of sandbox and be
>made a proper svn project with it's own trunk, branches, and tags?

Dunno; setuptools' presence in the sandbox predates the use of SVN for 
Python.  In any case, I'm more than happy with the status quo.  Note that 
there is also a branch for 0.6 maintenance in sandbox/branches.



More information about the Distutils-SIG mailing list