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

Ron Adam rrr at ronadam.com
Sat Jul 24 21:33:09 CEST 2010



On 07/24/2010 10:16 AM, Alexander Belopolsky wrote:
> On Sat, Jul 24, 2010 at 6:37 AM, Nick Coghlan<ncoghlan at gmail.com>  wrote:
> ..
>> For the "-b" option, if the server is already running (and hence the
>> port is in use), catch the exception, print a message and start the
>> webbrowser anyway.
>
> I was going to make a similar suggestion, but then realized that there
> it may not be easy or desirable for pydoc to figure out whether the
> service running on the used port is in fact pydoc.  Any query that
> pydoc would send may be disruptive depending on what program is
> listening on the port.  It may also get easily confused by a pydoc
> service from a different version of python.   It may be better to
> search for an unused port in the error case and pass it to the
> browser.

I'll try to look into improving how pydoc handles these types of errors. In 
the mean time if others have experience with browser apps and these kind of 
situations I'd like to hear about it.

Does this have to be in this particular patch?  I don't see any problem 
adding better error recovery later.  This isn't something new, both the 
"-p" and "-g" modes have this issue.

Ron




More information about the Python-Dev mailing list