[Python-Dev] [isssue 2001] Pydoc enhancement patch questions
Ron Adam
rrr at ronadam.com
Sat Jul 24 21:34:38 CEST 2010
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.)
Or are you suggesting having pydoc work either with the tk gui behavior
without any of the new features, or with the new features without the tk
gui, depending on how it's started? I'd prefer not to do this because it
would duplicate the server code and possibly other functions to produce
some of the web page outputs. That would make pydoc.py both larger and
harder to maintain. It may also make enhancing pydoc further more difficult
as well.
The current patch without the tk gui definitely makes things easier to
maintain IMHO.
Are there any compelling reasons for keeping the tk gui?
BTW, the synopsis search feature is currently broken in python 3.2. See
issue: http://bugs.python.org/issue9319
Once that is fixed, you can then play around with the search features with
and without this patch and see how they compare.
> - add a "-b" option to start the server and open the webbrowser automatically
> - allow "-p" to be combined with either "-b" or "-g" to specify where
> the server should run (or is running)
I also agree the "-p" option should work with the "-b" and/or "-g".
Using "-b" instead of reusing "-g" for browser only, makes sense to me.
Depending on weather or not the tk gui is kept, the "-g" option can either
open the tk gui or give a message to use the "-b" option instead.
Ron
More information about the Python-Dev
mailing list