~ubuntu-branches/ubuntu/karmic/libapache2-mod-python/karmic

« back to all changes in this revision

Viewing changes to doc-html/dir-other-pimp.html

  • Committer: Bazaar Package Importer
  • Author(s): Thom May
  • Date: 2004-09-06 20:27:57 UTC
  • Revision ID: james.westby@ubuntu.com-20040906202757-yzpyu1bcabgpjtiu
Tags: upstream-3.1.3
ImportĀ upstreamĀ versionĀ 3.1.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
 
2
<html>
 
3
<head>
 
4
<title>5.4.3 PythonImport</title>
 
5
<META NAME="description" CONTENT="5.4.3 PythonImport">
 
6
<META NAME="keywords" CONTENT="modpython">
 
7
<META NAME="resource-type" CONTENT="document">
 
8
<META NAME="distribution" CONTENT="global">
 
9
<link rel="STYLESHEET" href="modpython.css">
 
10
<link rel="first" href="modpython.html">
 
11
<link rel="contents" href="contents.html" title="Contents">
 
12
<link rel="index" href="genindex.html" title="Index">
 
13
<LINK REL="next" href="dir-other-ipd.html">
 
14
<LINK REL="previous" href="dir-other-pd.html">
 
15
<LINK REL="up" href="dir-other.html">
 
16
<LINK REL="next" href="dir-other-ipd.html">
 
17
</head>
 
18
<body>
 
19
<DIV CLASS="navigation">
 
20
<table align="center" width="100%" cellpadding="0" cellspacing="2">
 
21
<tr>
 
22
<td><A href="dir-other-pd.html"><img src="icons/previous.gif"
 
23
  border="0" height="32"
 
24
  alt="Previous Page" width="32"></A></td>
 
25
<td><A href="dir-other.html"><img src="icons/up.gif"
 
26
  border="0" height="32"
 
27
  alt="Up One Level" width="32"></A></td>
 
28
<td><A href="dir-other-ipd.html"><img src="icons/next.gif"
 
29
  border="0" height="32"
 
30
  alt="Next Page" width="32"></A></td>
 
31
<td align="center" width="100%">Mod_python Manual</td>
 
32
<td><A href="contents.html"><img src="icons/contents.gif"
 
33
  border="0" height="32"
 
34
  alt="Contents" width="32"></A></td>
 
35
<td><img src="icons/blank.gif"
 
36
  border="0" height="32"
 
37
  alt="" width="32"></td>
 
38
<td><A href="genindex.html"><img src="icons/index.gif"
 
39
  border="0" height="32"
 
40
  alt="Index" width="32"></A></td>
 
41
</tr></table>
 
42
<b class="navlabel">Previous:</b> <a class="sectref" href="dir-other-pd.html">5.4.2 PythonDebug</A>
 
43
<b class="navlabel">Up:</b> <a class="sectref" href="dir-other.html">5.4 Other Directives</A>
 
44
<b class="navlabel">Next:</b> <a class="sectref" href="dir-other-ipd.html">5.4.4 PythonInterpPerDirectory</A>
 
45
<br><hr>
 
46
</DIV>
 
47
<!--End of Navigation Panel-->
 
48
 
 
49
<H2><A NAME="SECTION007430000000000000000">&nbsp;</A>
 
50
<a name="l2h-241">&nbsp;</a>
 
51
<BR>
 
52
5.4.3 PythonImport
 
53
</H2>
 
54
 
 
55
<P>
 
56
<b><em class="citetitle"><a
 
57
 href="http://httpd.apache.org/docs-2.0/mod/directive-dict.html#Syntax"
 
58
 title="Syntax:"
 
59
 >Syntax:</a></em></b>
 
60
PythonImport <i>module</i> <i>interpreter_name</i>
 
61
<BR><em class="citetitle"><a
 
62
 href="http://httpd.apache.org/docs-2.0/mod/directive-dict.html#Context"
 
63
 title="Context:"
 
64
 >Context:</a></em>
 
65
server config
 
66
<BR><em class="citetitle"><a
 
67
 href="http://httpd.apache.org/docs-2.0/mod/directive-dict.html#Module"
 
68
 title="Module:"
 
69
 >Module:</a></em>
 
70
mod_python.c
 
71
 
 
72
<P>
 
73
Tells the server to import the Python module module at process startup
 
74
under the specified interpreter name. This is useful for
 
75
initialization tasks that could be time consuming and should not be
 
76
done at the request processing time, e.g. initializing a database
 
77
connection.
 
78
 
 
79
<P>
 
80
The import takes place at child process initialization, so the module
 
81
will actually be imported once for every child process spawned.
 
82
 
 
83
<P>
 
84
<div class="note"><b class="label">Note:</b>
 
85
At the time when the import takes place, the configuration is not
 
86
  completely read yet, so all other directives, including
 
87
  PythonInterpreter have no effect on the behavior of modules imported
 
88
  by this directive. Because of this limitation, the interpreter must
 
89
  be specified explicitly, and must match the name under which
 
90
  subsequent requests relying on this operation will execute. If you
 
91
  are not sure under what interpreter name a request is running,
 
92
  examine the <tt class="member">interpreter</tt> member of the request object.
 
93
</div>
 
94
 
 
95
<P>
 
96
See also Multiple Interpreters. 
 
97
 
 
98
<P>
 
99
 
 
100
<DIV CLASS="navigation">
 
101
<p><hr>
 
102
<table align="center" width="100%" cellpadding="0" cellspacing="2">
 
103
<tr>
 
104
<td><A href="dir-other-pd.html"><img src="icons/previous.gif"
 
105
  border="0" height="32"
 
106
  alt="Previous Page" width="32"></A></td>
 
107
<td><A href="dir-other.html"><img src="icons/up.gif"
 
108
  border="0" height="32"
 
109
  alt="Up One Level" width="32"></A></td>
 
110
<td><A href="dir-other-ipd.html"><img src="icons/next.gif"
 
111
  border="0" height="32"
 
112
  alt="Next Page" width="32"></A></td>
 
113
<td align="center" width="100%">Mod_python Manual</td>
 
114
<td><A href="contents.html"><img src="icons/contents.gif"
 
115
  border="0" height="32"
 
116
  alt="Contents" width="32"></A></td>
 
117
<td><img src="icons/blank.gif"
 
118
  border="0" height="32"
 
119
  alt="" width="32"></td>
 
120
<td><A href="genindex.html"><img src="icons/index.gif"
 
121
  border="0" height="32"
 
122
  alt="Index" width="32"></A></td>
 
123
</tr></table>
 
124
<b class="navlabel">Previous:</b> <a class="sectref" href="dir-other-pd.html">5.4.2 PythonDebug</A>
 
125
<b class="navlabel">Up:</b> <a class="sectref" href="dir-other.html">5.4 Other Directives</A>
 
126
<b class="navlabel">Next:</b> <a class="sectref" href="dir-other-ipd.html">5.4.4 PythonInterpPerDirectory</A>
 
127
<hr>
 
128
<span class="release-info">Release 3.1.3, documentation updated on February 17, 2004.</span>
 
129
</DIV>
 
130
<!--End of Navigation Panel-->
 
131
 
 
132
</BODY>
 
133
</HTML>