[Python-Dev] A kind of configuration question
Tim Peters
tim.one@home.com
Mon, 9 Apr 2001 01:00:18 -0400
[Moore, Paul]
> ...
> --- pydoc.bat ---
> @echo off
> if "%1"=="" pythonw -c "import pydoc; pydoc.cli()"
> if NOT "%1"=="" python -c "import pydoc; pydoc.cli()" %1 %2 %3 %4 ...
> ---
>
> I do the test on %1 so that if the command is called without any
> arguments, it uses pythonw to spawn the GUI webserver, whereas with
> arguments it does the command line stuff.
FYI, that's what appears to have gotten broken the morning of the 2.1b2
release. If you do
pythonw -c "import pydoc; pydoc.cli()"
then or today, "nothing happens" (actually, a usage blurb gets printed to
stdout, but under pythonw that's effectively /dev/null).
If you're determined to write .bat scripts <wink>, now you want
pythonw -c "import pydoc; pydoc.gui()"
or
pythonw -c "import pydoc; pydoc.cli()" -g
instead.