By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,660 Members | 1,100 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,660 IT Pros & Developers. It's quick & easy.

Outputting my python code to a webpage

P: 22
I wrote a python script and when I run it, it outputs what I want, so I know that it is working. Now I want to be able to put the output of the code on my website and I have no idea how to do this, or even where to begin for that matter. Thanks!
Jul 25 '09 #1
Share this Question
Share on Google+
6 Replies


micmast
100+
P: 144
you have multiple options. the first is export the output to a html file and place that in the web document root. another is a wrapper in for example php where you call the script and use the output.
The last option I can think of is run python code with for example cherrypy. Could you be more specific?
Jul 25 '09 #2

P: 22
I would like to export the output to a html file. My python code is saved as verification.py and I would like to output that code to verification.html. And I am not sure how I would do that.
Jul 25 '09 #3

micmast
100+
P: 144
you could create the html file by writing to content like the file in plain text. Just make sure you add the correct html tags.
Jul 25 '09 #4

P: 22
Ok. I am new with this and I am not sure what html tags to add.
Jul 25 '09 #5

P: 22
I figured it out...Thanks!
Jul 25 '09 #6

micmast
100+
P: 144
you are welcome :) hope I can help out some more in the future.
Jul 26 '09 #7

Post your reply

Sign in to post your reply or Sign up for a free account.