On 07/24/2010 10:44 PM, Nick Coghlan wrote:

To request automatic assignment of a local port number, "-p 0" could
be made to work correctly (i.e. print out the actual port the OS
assigned rather than the 0 that was passed in on the command line as
it does currently).

I was able to implement this without too much trouble. I also changed it so -b and -p switches can be used together to override the automatic port selection. The default is port 0.

I think idle uses automatic port selection now also. Does it have a way to select a specific port? Is the -p option needed with automatic port selection.

I added a command prompt like the help> prompt. Here's what starting the server, opening a browser, and then stopping the server looks like.

r...@gutsy:/media/hda2/home/ra/svn/py3k$ ./python -m pydoc -p 0
Server ready at: http://localhost:50279/
Server commands: [b]rowser, [q]uit
server>b
server>q
Server stopped
[83680 refs]
r...@gutsy:/media/hda2/home/ra/svn/py3k$

I can add a [h]elp to get a longer help, but I'm not sure it's needed.

I want to have a [r]eport command to list the server requests since the last report command was given. Sort of like a log. It may be useful to find problems with what the server is sending and what the browser is requesting.

Should the server have a timeout in case the command window is not reachable? If so, how long?

cheers,
   Ron



_______________________________________________
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