1
1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
4
<link rel="STYLESHEET" href="modpython.css" type='text/css'>
5
<link rel="first" href="modpython.html" title='Mod_python Manual'>
6
<link rel='contents' href='contents.html' title="Contents">
7
<link rel='index' href='genindex.html' title='Index'>
8
<link rel='last' href='about.html' title='About this document...'>
9
<link rel='help' href='about.html' title='About this document...'>
10
<LINK REL="prev" href="pyapi-sess.html">
11
<LINK REL="parent" href="pythonapi.html">
12
<LINK REL="next" href="directives.html">
13
<meta name='aesop' content='information'>
14
<META NAME="description" CONTENT="psp - Python Server Pages">
15
<META NAME="keywords" CONTENT="modpython">
16
<META NAME="resource-type" CONTENT="document">
17
<META NAME="distribution" CONTENT="global">
4
<link rel="STYLESHEET" href="modpython.css" type='text/css' />
5
<link rel="first" href="modpython.html" title='Mod_python Manual' />
6
<link rel='contents' href='contents.html' title="Contents" />
7
<link rel='index' href='genindex.html' title='Index' />
8
<link rel='last' href='about.html' title='About this document...' />
9
<link rel='help' href='about.html' title='About this document...' />
10
<link rel="prev" href="pyapi-sess.html" />
11
<link rel="parent" href="pythonapi.html" />
12
<link rel="next" href="directives.html" />
13
<meta name='aesop' content='information' />
18
14
<title>4.9 psp - Python Server Pages</title>
21
17
<DIV CLASS="navigation">
18
<div id='top-navigation-panel' xml:id='top-navigation-panel'>
22
19
<table align="center" width="100%" cellpadding="0" cellspacing="2">
24
<td><a rel="prev" title="4.8.2 Examples"
25
href="pyapi-sess-example.html"><img src='previous.gif'
26
border='0' height='32' alt='Previous Page' width='32'></A></td>
27
<td><a rel="parent" title="4. Python API"
28
href="pythonapi.html"><img src='up.gif'
29
border='0' height='32' alt='Up One Level' width='32'></A></td>
30
<td><a rel="next" title="5. Apache Configuration Directives"
31
href="directives.html"><img src='next.gif'
32
border='0' height='32' alt='Next Page' width='32'></A></td>
21
<td class='online-navigation'><a rel="prev" title="4.8.2 Examples"
22
href="pyapi-sess-example.html"><img src='previous.png'
23
border='0' height='32' alt='Previous Page' width='32' /></A></td>
24
<td class='online-navigation'><a rel="parent" title="4. Python API"
25
href="pythonapi.html"><img src='up.png'
26
border='0' height='32' alt='Up One Level' width='32' /></A></td>
27
<td class='online-navigation'><a rel="next" title="5. Apache Configuration Directives"
28
href="directives.html"><img src='next.png'
29
border='0' height='32' alt='Next Page' width='32' /></A></td>
33
30
<td align="center" width="100%">Mod_python Manual</td>
34
<td><a rel="contents" title="Table of Contents"
35
href="contents.html"><img src='contents.gif'
36
border='0' height='32' alt='Contents' width='32'></A></td>
37
<td><img src='blank.gif'
38
border='0' height='32' alt='' width='32'></td>
39
<td><a rel="index" title="Index"
40
href="genindex.html"><img src='index.gif'
41
border='0' height='32' alt='Index' width='32'></A></td>
31
<td class='online-navigation'><a rel="contents" title="Table of Contents"
32
href="contents.html"><img src='contents.png'
33
border='0' height='32' alt='Contents' width='32' /></A></td>
34
<td class='online-navigation'><img src='blank.png'
35
border='0' height='32' alt='' width='32' /></td>
36
<td class='online-navigation'><a rel="index" title="Index"
37
href="genindex.html"><img src='index.png'
38
border='0' height='32' alt='Index' width='32' /></A></td>
40
<div class='online-navigation'>
43
41
<b class="navlabel">Previous:</b>
44
42
<a class="sectref" rel="prev" href="pyapi-sess-example.html">4.8.2 Examples</A>
45
43
<b class="navlabel">Up:</b>
46
44
<a class="sectref" rel="parent" href="pythonapi.html">4. Python API</A>
47
45
<b class="navlabel">Next:</b>
48
46
<a class="sectref" rel="next" href="directives.html">5. Apache Configuration Directives</A>
51
50
<!--End of Navigation Panel-->
53
<H1><A NAME="SECTION006900000000000000000"> </A>
52
<H1><A NAME="SECTION006900000000000000000"></A><A NAME="pyapi-psp"></A>
55
54
4.9 <tt class="module">psp</tt> - Python Server Pages
56
<A NAME="module-psp"></A>
60
59
The <tt class="module">psp</tt> module provides a way to convert text documents
248
Note that the above name for the option setting was only changed to
249
this value in mod_python 3.3. If you need to retain backward compatability
250
with older versions of mod_python use the <code>PSPDbmCache</code> option
248
254
<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
249
<td><nobr><b><a name="l2h-236"><tt class="method">run</tt></a></b>(</nobr></td>
250
<td><big>[</big><var>vars</var><big>]</big>)</td></tr></table>
255
<td><nobr><b><tt id='l2h-259' xml:id='l2h-259' class="method">run</tt></b>(</nobr></td>
256
<td><var></var><big>[</big><var>vars, flush</var><big>]</big><var></var>)</td></tr></table></dt>
252
258
This method will execute the code (produced at object
253
259
initialization time by parsing and compiling the PSP
254
260
source). Optional argument <var>vars</var> is a dictionary keyed by
255
strings that will be passed in as global variables.
261
strings that will be passed in as global variables. Optional
262
argument <var>flush</var> is a boolean flag indicating whether output
263
should be flushed. The default is not to flush output.
258
266
Additionally, the PSP code will be given global variables
409
417
<DIV CLASS="navigation">
418
<div class='online-navigation'>
411
420
<table align="center" width="100%" cellpadding="0" cellspacing="2">
413
<td><a rel="prev" title="4.8.2 Examples"
414
rel="prev" title="4.8.2 Examples"
415
href="pyapi-sess-example.html"><img src='previous.gif'
416
border='0' height='32' alt='Previous Page' width='32'></A></td>
417
<td><a rel="parent" title="4. Python API"
418
rel="parent" title="4. Python API"
419
href="pythonapi.html"><img src='up.gif'
420
border='0' height='32' alt='Up One Level' width='32'></A></td>
421
<td><a rel="next" title="5. Apache Configuration Directives"
422
rel="next" title="5. Apache Configuration Directives"
423
href="directives.html"><img src='next.gif'
424
border='0' height='32' alt='Next Page' width='32'></A></td>
422
<td class='online-navigation'><a rel="prev" title="4.8.2 Examples"
423
href="pyapi-sess-example.html"><img src='previous.png'
424
border='0' height='32' alt='Previous Page' width='32' /></A></td>
425
<td class='online-navigation'><a rel="parent" title="4. Python API"
426
href="pythonapi.html"><img src='up.png'
427
border='0' height='32' alt='Up One Level' width='32' /></A></td>
428
<td class='online-navigation'><a rel="next" title="5. Apache Configuration Directives"
429
href="directives.html"><img src='next.png'
430
border='0' height='32' alt='Next Page' width='32' /></A></td>
425
431
<td align="center" width="100%">Mod_python Manual</td>
426
<td><a rel="contents" title="Table of Contents"
427
rel="contents" title="Table of Contents"
428
href="contents.html"><img src='contents.gif'
429
border='0' height='32' alt='Contents' width='32'></A></td>
430
<td><img src='blank.gif'
431
border='0' height='32' alt='' width='32'></td>
432
<td><a rel="index" title="Index"
433
rel="index" title="Index"
434
href="genindex.html"><img src='index.gif'
435
border='0' height='32' alt='Index' width='32'></A></td>
432
<td class='online-navigation'><a rel="contents" title="Table of Contents"
433
href="contents.html"><img src='contents.png'
434
border='0' height='32' alt='Contents' width='32' /></A></td>
435
<td class='online-navigation'><img src='blank.png'
436
border='0' height='32' alt='' width='32' /></td>
437
<td class='online-navigation'><a rel="index" title="Index"
438
href="genindex.html"><img src='index.png'
439
border='0' height='32' alt='Index' width='32' /></A></td>
441
<div class='online-navigation'>
437
442
<b class="navlabel">Previous:</b>
438
443
<a class="sectref" rel="prev" href="pyapi-sess-example.html">4.8.2 Examples</A>
439
444
<b class="navlabel">Up:</b>
440
445
<a class="sectref" rel="parent" href="pythonapi.html">4. Python API</A>
441
446
<b class="navlabel">Next:</b>
442
447
<a class="sectref" rel="next" href="directives.html">5. Apache Configuration Directives</A>
444
<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span>
451
<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span>
446
453
<!--End of Navigation Panel-->