3
Contributors
2
Replies
4
Views
7 Years
Discussion Span
Last Post by snippsat
0

You have to use some sort of web framework,
Ruby by itself doesn't work on the web, so that's why there is Rails.

Same thing with Python,
you have to use something like Django, web2py, pylons, etc.

0

You can use cgi module,work in way same as php.
The other way is as postet over use to use web framework.

To test cgi you have to run a webserver like xampp.
To set up xampp look here.
http://jerryoem.spaces.live.com/Blog/cns!4032172F84519E20!342.entry
Then you can run python script in browser.

This will print hello world in your browser.

#!C:/python26/python.exe 
print "Content-type: text/html\n\n"

print('''\
<html>
<head>
<title>Hello</title>
</head>
<body>
Hello world!
</body>
</html>
''')

Links for cgi.
http://www.tutorialspoint.com/python/python_cgi_programming.htm
http://webpython.codepoint.net/cgi_tutorial

Edited by snippsat: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.