Dynamic HTML from Python Script
aweraw at gmail.com
Wed Jun 11 02:51:53 CEST 2008
> I have a python script whose output i want to dynamically display
> on a webpage which will be hosted using Apache. How do I do that?
Well, there's a few ways you could approach it.
You could create a cgi program from your script - this is probably the
solution you're looking for.
You could have the script run periodically and create a static html file
in the webroot... this would be acceptable, maybe preferable, if the
output from your script doesn't change frequently.
There's also more advanced ways you can make python code run in a
web-service. Cherrypy comes to mind, as well as the myriad python MVC
More information about the Python-list