On 07/24/2010 10:38 PM, Nick Coghlan wrote:
On Sun, Jul 25, 2010 at 5:34 AM, Ron Adam<r...@ronadam.com>  wrote:


On 07/24/2010 05:37 AM, Nick Coghlan wrote:

On Sat, Jul 24, 2010 at 10:05 AM, Ron Adam<r...@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.

Good ideas.


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

I see what you mean. The point is to always enable a way to communicate to the server directly. I've fairly often have had to kill the server with the task manager. or on ubuntu, use the system monitor to stop the server. That's definitely not novice friendly.

Currently the port is printed on the console when started from the console, but there isn't a clean way to stop the server and no message to say how.

The gui is needed for when pydoc is started without a console ie.. by an icon in windows.


Another way to communicate to the server would be to add a link in the browser to open a server status page. For example my router has a configure page where I can check it's status and do other things. That might be something worth exploring at some later date.



Here are some thoughts...

The gui window can have a panal to display the server output. Currently it goes to the console window which may not be visible. This would replace the search results panel.

If the gui window is not opened, ie... tk isn't installed or the user prefers the console, have the console window accept commands that correspond to the tk window.

Both can have a way to turn on and off verbosity which will display the server activity.


Cheers,
  Ron

I'll be away from my computer most of today, I will start making some of the changes we have been discussing later tonight.

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to