I'm trying to use
upstart so that the
pydoc webserver for a package I'm developing always runs. If I run it from the command line:
pydoc -p 7464 /some_path/my_python_package
it works fine, and going to
localhost:7464/my_python_package displays the documentation. However if I put it in an upstart script, e.g.
start on startup start on runlevel [2,3,4,5] stop on runlevel [0,1,6] script pydoc -p 7464 /some_path/my_python_package end script
then when I open up the browser at
localhost:7464/my_python_package I get the following:
no Python documentation found for 'my_python_package'
localhost:7464 shows all of the standard python packages as normal, so it seems like upstart isn't parsing the path correctly.
I tried using putting
export PYTHONPATH='/some_path' in and changing the execution line to
pydoc -p 7464 $PYTHONPATH/my_python_package but this didn't work either.