Programming Web Services : Introduction « CGI Web « Python Tutorial

Home
Python Tutorial
1.Introduction
2.Data Type
3.Statement
4.Operator
5.String
6.Tuple
7.List
8.Dictionary
9.Collections
10.Function
11.Class
12.File
13.Buildin Function
14.Buildin Module
15.Database
16.Regular Expressions
17.Thread
18.Tkinker
19.wxPython
20.XML
21.Network
22.CGI Web
23.Windows
Python Tutorial » CGI Web » Introduction 
22.1.5.Programming Web Services
#!/usr/bin/python

#Send header to browser
print "Content-type: text/html\n"
print "<title>CGI Text</title>\n"
webText = """
<li><a href="http://www.python.org">
Python Web Site</a></li>
<li><a href="http://docs.python.org">
Python Documentation</a></li>
<li><a href="http://cheeseshop.python.org">
Cheeseshop</a>
</li>
"""

print webText
22.1.Introduction
22.1.1.A Simple CGI Script
22.1.2.CGI Environment
22.1.3.A Script for Displaying the Environment
22.1.4.Your First Python CGI Script: Hello Apache
22.1.5.Programming Web Services
22.1.6.Processing Parameters Passed to CGI Scripts
22.1.7.Displays the current date and time in a Web browser.
22.1.8.Program to display CGI environment variables
22.1.9.Output current time
22.1.10.escape strings
22.1.11.Output html list
22.1.12.print web page content
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.