Dynamic HTML from Python Script
Aidan
aweraw at gmail.com
Tue Jun 10 20:51:53 EDT 2008
asdf wrote:
> 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?
>
>
> thanks
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
frameworks.
More information about the Python-list
mailing list