[Python-Dev] [isssue 2001] Pydoc enhancement patch questions

Nick Coghlan ncoghlan at gmail.com
Sun Jul 25 05:38:59 CEST 2010


On Sun, Jul 25, 2010 at 5:34 AM, Ron Adam <rrr at ronadam.com> wrote:
>
>
> On 07/24/2010 05:37 AM, Nick Coghlan wrote:
>>
>> On Sat, Jul 24, 2010 at 10:05 AM, Ron Adam<rrr at ronadam.com>  wrote:
>>>>
>>>> I am not sure I like the fact that the browser is started automatically.
>>>> Please bring this up on python-dev.  This may be an opportunity to
>>>> rethink pydoc command line switches.  For example, -p and -g are
>>>> currently exclusive, but it would make sense for -g to start server on
>>>> the port specified by -p.
>>>
>>> So are any thoughts on starting the web browser automatically, and on how
>>> the -g and -p command line switches work?
>>
>> My suggestion:
>>
>> - leave the "-g" option alone (including the tk gui), but make sure
>> other options still work when tk is unavailable
>
> I was hoping it would be ok to drop the tk gui in pydoc.  Keeping it
> requires rewriting the tk gui interface to use the new server because the
> server code and the gui code are not cleanly separate.  I can do this if
> it's really wanted. (Nothing against tKinter, I use it for my own gui apps.)

I'd be completely fine with dropping the "Search For" box from the GUI
interface, but the persistent window listing the served port and
providing "Open Browser" and "Quit Serving" buttons still seems quite
useful even without the search box (When running "python -m pydoc -p
8080 &", it took me a moment to figure out how to kill the server I
had started). You could even tidy it up a bit and include things like
the Python version in the GUI window.

Specifying both -b and -g should open both the (limited) GUI and the
web browser.


-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia


More information about the Python-Dev mailing list