1

I have a project which I would like to have it's documentation on a external server. I know I do pydoc -p 5000 I will have my documentation on http://localhost:5000/. However I'm planning to host that documentation on a EC2 instance, as an external server everyone can access. Let's say the IP address of the machine is 10.10.10.10, and it's totally configurable to be access externally. How can I have pydoc to run my server externally?

2 Answers 2

2

As the docs state:

Specifying a -w flag before the argument will cause HTML documentation to be written out to a file in the current directory, instead of displaying text on the console.

Therefore, use the -w flag to write the documentation to files, which you can then copy to your server and have it served as static files. For example, the command pydoc -w somelib would write a file somelib.html which contained the documentation for somelib. Copy that to the root of your server and it would be available at http://10.10.10.10/somelib.html (assuming your server is configured correctly).

Sign up to request clarification or add additional context in comments.

Comments

1

This feature will be added in version 3.7.

Documentation.

Changed in version 3.7: Added the -n option.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.