181.html

来自「Python Ebook Python&XML」· HTML 代码 · 共 89 行

HTML
89
字号

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Robots" content="INDEX,NOFOLLOW">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<TITLE>Safari | Python Developer's Handbook -&gt; Web Programming</TITLE>
<LINK REL="stylesheet" HREF="oreillyi/oreillyN.css">
</HEAD>
<BODY bgcolor="white" text="black" link="#990000" vlink="#990000" alink="#990000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">

<table width="100%" cellpadding=5 cellspacing=0 border=0 class="navtopbg"><tr><td><font size="1"><p class="navtitle"><a href="8.html" class="navtitle">Web Development</a> &gt; <a href="0672319942.html" class="navtitle">Python Developer's Handbook</a> &gt; <a href="179.html" class="navtitle">12. Scripting Programming</a> &gt; <span class="nonavtitle">Web Programming</span></p></font></td><td align="right" valign="top" nowrap><font size="1"><a href="main.asp?list" class="safnavoff">See All Titles</a></font></td></tr></table>
<TABLE width=100% bgcolor=white border=0 cellspacing=0 cellpadding=5><TR><TD>
<TABLE border=0 width="100%" cellspacing=0 cellpadding=0><TR><td align=left width="15%" class="headingsubbarbg"><a href="180.html" title="12. Scripting Programming"><font size="1">&lt;&nbsp;BACK</font></a></td><td align=center width="70%" class="headingsubbarbg"><font size="1"><a href="popanote.asp?pubui=oreilly&bookname=0672319942&snode=181" target="_blank" title="Make a public or private annnotation">Make Note</a> | <a href="181.html" title="Use a Safari bookmark to remember this section">Bookmark</a></font></td><td align=right width="15%" class="headingsubbarbg"><a href="182.html" title="An Introduction to CGI"><font size="1">CONTINUE&nbsp;&gt;</font></a></td></TR></TABLE>
<a href="5%2F31%2F2002+4%3A44%3A30+PM.html" TABINDEX="-1"><img src=images/spacer.gif border=0 width=1 height=1></a><font color=white size=1>152015024128143245168232148039199167010047123209178152124239215162148040135186111045046177</font><a href="read9.asp?bookname=0672319942&snode=181&now=5%2F31%2F2002+4%3A44%3A30+PM" TABINDEX="-1"><img src=images/spacer.gif border=0 width=1 height=1></a><br>
<FONT>
				<h3>Web Programming</h3>
				<p>Python has a very extensive, well documented and portable module library that provides a large variety of useful modules. The Internet-related collection is particularly impressive, with modules that deal with everything from parsing and retrieving URLs to retrieving mail from POP servers, including <a NAME="idx1073746573"></a>
					<a naME="idx1073746574"></A>
					<A name="idx1073746575"></A>CGI scripting.</P>

				<P>Python is suitable for CGI programming on Windows, Mac, and UNIX platforms, allowing the creation of programs that
provide services over the Internet. Its capability to create dynamic content makes the task of generating Web pages on-the-fly
a very easy thing to do.</P>

				<p>However, before starting to implement your Web pages using CGI scripts, you need to think about whether it is really
necessary to build dynamic pages for your site. Keep in mind that if the information is not modified very often, static pages
are the best solution because dynamic pages always slow down the server. You can decide whether to use it, but if you
conclude that it would work for you, this chapter might help you a lot.</p>

				<div class="note"><p class="notetitle"><b>Note</b></p><p>

					<P>It's also good to mention that if you need a way to periodically build <a nAme="idx1073746576"></a>
						<A name="idx1073746577"></A>auto-generated pages, you can implement solutions based on the use of <tt cLASS="monofont">cron</tt> on UNIX-like
systems. For the Windows NT, you have both the <tt CLASs="monofont">at</tt> command, and the scheduled tasks extensions found in
the newer copies of the Internet Explorer.</p>

				</P></DIV>
<br>
<br>

				<P>If your site becomes busy enough that the cost of starting a Python interpreter for each CGI request becomes
significant, you can use Web Server modules (such as <TT Class="monofont">mod_python</tt>) to <a name="idx1073746578"></a>
					<a name="idx1073746579"></a>
					<a nAme="idx1073746580"></A>embed the Python interpreter in the server, hence, avoiding the startup time. <a naMe="idx1073746581"></a>
					<a nAme="idx1073746582"></a>
					<A NAMe="idx1073746583"></a>
					<a nAME="idx1073746584"></A>
					<a namE="idx1073746585"></A>Zope provides yet another way to have Python scripts without the interpreter startup time to worry about. Python
code can also be invoked on top of Active Server Pages (ASP) under IIS.</P>

			</Font>
<P><TABLE width="100%" border=0><TR valign="top"><TD><font size=1 color="#C0C0C0"><br></font></TD><TD align=right><font size=1 color="#C0C0C0">Last updated on 1/30/2002<br>Python Developer's Handbook, &copy;&nbsp;2002 Sams Publishing</font></TD></TR></TABLE></P>
<TABLE border=0 width="100%" cellspacing=0 cellpadding=0><TR><td align=left width="15%" class="headingsubbarbg"><a href="180.html" title="12. Scripting Programming"><font size="1">&lt;&nbsp;BACK</font></a></td><td align=center width="70%" class="headingsubbarbg"><font size="1"><a href="popanote.asp?pubui=oreilly&bookname=0672319942&snode=181" target="_blank" title="Make a public or private annnotation">Make Note</a> | <a href="181.html" title="Use a Safari bookmark to remember this section">Bookmark</a></font></td><td align=right width="15%" class="headingsubbarbg"><a href="182.html" title="An Introduction to CGI"><font size="1">CONTINUE&nbsp;&gt;</font></a></td></TR></TABLE>
</TD></TR></TABLE>
<br><TABLE width=100% bgcolor=white border=0 cellspacing=0 cellpadding=5><TR><TD><H4 class=Title>Index terms contained in this section</H4>
<font size=2>
applications<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="#idx1073746582">Z Object Publishing Environment (Zope)</a><BR>
 <a href="#idx1073746576">autogenerated pages</a><BR>
 <a href="#idx1073746575">CGI (Common Gateway Interface) scripts</a><BR>
 <a href="#idx1073746574">Common Gateway Interface (CGI) scripts</a><BR>
embedding<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="#idx1073746578">interpreters in servers</a><BR>
interpreters<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="#idx1073746579">embedding in servers</a><BR>
pages<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="#idx1073746577">autogenerated</a><BR>
programs<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="#idx1073746583">Z Object Publishing Environment (Zope)</a><BR>
scripts<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="#idx1073746573">Common Gateway Interface (CGI)</a><BR>
servers<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="#idx1073746580">embedding interpreters</a><BR>
software<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="#idx1073746584">Z Object Publishing Environment (Zope)</a><BR>
 <a href="#idx1073746581">Z Object Publishing Environment (Zope)</a><BR>
 <a href="#idx1073746585">Zope (Z Object Publishing Environment)</a><BR>
<BR>
</font></TD></TR></TABLE>




<!--EndOfBrowse-->

</TD></TR></TABLE>
<table width=100% border=0 cellspacing=0 cellpadding=0 bgcolor=#990000><tr><td><p align=center><font size=1 face="verdana,arial,helvetica" color=white>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?