Sep-18-2019, 10:59 PM
For some time I've been starting a pydoc server (Python 2.7) from my desktop startup scripts and using it to document a server directory containing a collection of Python scripts. This script is simple:
cd [NFS-mounted directory containing Python scripts]
sudo pydoc -p 789 & > /dev/null 2>&1
This works as expected and I can access the documentation with http://localhost:789
Pursuant to moving toward pyton3, I want to do the same thing with pydoc3, however pydoc3 insists on opening a "server>" interactive prompt which I don't need and can't suppress. The purpose of the prompt is apparently to allow CLI opening of a browser (so I have to use a non-privileged port) however in my case this is spurious since I have the URL bookmarked in my development browser.
Regular Unix job control commands don't work to background the pydoc3 server process, so it's effectively blocking at a shell level, making scripting difficult or impossible.
This looks like a bug, although I can't find any documentation on it. Is there a workaround?
cd [NFS-mounted directory containing Python scripts]
sudo pydoc -p 789 & > /dev/null 2>&1
This works as expected and I can access the documentation with http://localhost:789
Pursuant to moving toward pyton3, I want to do the same thing with pydoc3, however pydoc3 insists on opening a "server>" interactive prompt which I don't need and can't suppress. The purpose of the prompt is apparently to allow CLI opening of a browser (so I have to use a non-privileged port) however in my case this is spurious since I have the URL bookmarked in my development browser.
Regular Unix job control commands don't work to background the pydoc3 server process, so it's effectively blocking at a shell level, making scripting difficult or impossible.
This looks like a bug, although I can't find any documentation on it. Is there a workaround?