Initial commit of OpenSPARC T2 architecture model.
[OpenSPARC-T2-SAM] / sam-t2 / devtools / v8plus / html / python / dist / node10.html
CommitLineData
920dae64
AT
1<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2<html>
3<head>
4<link rel="STYLESHEET" href="dist.css" type='text/css' />
5<link rel="SHORTCUT ICON" href="../icons/pyfav.png" type="image/png" />
6<link rel='start' href='../index.html' title='Python Documentation Index' />
7<link rel="first" href="dist.html" title='Distributing Python Modules' />
8<link rel='index' href='genindex.html' title='Index' />
9<link rel='last' href='about.html' title='About this document...' />
10<link rel='help' href='about.html' title='About this document...' />
11<link rel="next" href="node11.html" />
12<link rel="prev" href="describing-extensions.html" />
13<link rel="parent" href="setup-script.html" />
14<link rel="next" href="node11.html" />
15<meta name='aesop' content='information' />
16<title>2.4 Installing Scripts</title>
17</head>
18<body>
19<DIV CLASS="navigation">
20<div id='top-navigation-panel' xml:id='top-navigation-panel'>
21<table align="center" width="100%" cellpadding="0" cellspacing="2">
22<tr>
23<td class='online-navigation'><a rel="prev" title="2.3 Describing extension modules"
24 href="describing-extensions.html"><img src='../icons/previous.png'
25 border='0' height='32' alt='Previous Page' width='32' /></A></td>
26<td class='online-navigation'><a rel="parent" title="2. Writing the Setup"
27 href="setup-script.html"><img src='../icons/up.png'
28 border='0' height='32' alt='Up One Level' width='32' /></A></td>
29<td class='online-navigation'><a rel="next" title="2.5 Installing Package Data"
30 href="node11.html"><img src='../icons/next.png'
31 border='0' height='32' alt='Next Page' width='32' /></A></td>
32<td align="center" width="100%">Distributing Python Modules</td>
33<td class='online-navigation'><img src='../icons/blank.png'
34 border='0' height='32' alt='' width='32' /></td>
35<td class='online-navigation'><a href="modindex.html" title="Module Index"><img src='../icons/modules.png'
36 border='0' height='32' alt='Module Index' width='32' /></a></td>
37<td class='online-navigation'><a rel="index" title="Index"
38 href="genindex.html"><img src='../icons/index.png'
39 border='0' height='32' alt='Index' width='32' /></A></td>
40</tr></table>
41<div class='online-navigation'>
42<b class="navlabel">Previous:</b>
43<a class="sectref" rel="prev" href="describing-extensions.html">2.3 Describing extension modules</A>
44<b class="navlabel">Up:</b>
45<a class="sectref" rel="parent" href="setup-script.html">2. Writing the Setup</A>
46<b class="navlabel">Next:</b>
47<a class="sectref" rel="next" href="node11.html">2.5 Installing Package Data</A>
48</div>
49<hr /></div>
50</DIV>
51<!--End of Navigation Panel-->
52
53<H1><A NAME="SECTION002400000000000000000">
542.4 Installing Scripts</A>
55</H1>
56So far we have been dealing with pure and non-pure Python modules,
57which are usually not run by themselves but imported by scripts.
58
59<P>
60Scripts are files containing Python source code, intended to be
61started from the command line. Scripts don't require Distutils to do
62anything very complicated. The only clever feature is that if the
63first line of the script starts with <code>#!</code> and contains the word
64``python'', the Distutils will adjust the first line to refer to the
65current interpreter location. By default, it is replaced with the
66current interpreter location. The <b class="programopt">--executable</b> (or
67<b class="programopt">-e</b>) option will allow the interpreter path to be
68explicitly overridden.
69
70<P>
71The <span class="du-option">scripts</span> option simply is a list of files to be handled
72in this way. From the PyXML setup script:
73
74<P>
75<div class="verbatim"><pre>
76setup(...
77 scripts=['scripts/xmlproc_parse', 'scripts/xmlproc_val']
78 )
79</pre></div>
80
81<P>
82
83<DIV CLASS="navigation">
84<div class='online-navigation'>
85<p></p><hr />
86<table align="center" width="100%" cellpadding="0" cellspacing="2">
87<tr>
88<td class='online-navigation'><a rel="prev" title="2.3 Describing extension modules"
89 href="describing-extensions.html"><img src='../icons/previous.png'
90 border='0' height='32' alt='Previous Page' width='32' /></A></td>
91<td class='online-navigation'><a rel="parent" title="2. Writing the Setup"
92 href="setup-script.html"><img src='../icons/up.png'
93 border='0' height='32' alt='Up One Level' width='32' /></A></td>
94<td class='online-navigation'><a rel="next" title="2.5 Installing Package Data"
95 href="node11.html"><img src='../icons/next.png'
96 border='0' height='32' alt='Next Page' width='32' /></A></td>
97<td align="center" width="100%">Distributing Python Modules</td>
98<td class='online-navigation'><img src='../icons/blank.png'
99 border='0' height='32' alt='' width='32' /></td>
100<td class='online-navigation'><a href="modindex.html" title="Module Index"><img src='../icons/modules.png'
101 border='0' height='32' alt='Module Index' width='32' /></a></td>
102<td class='online-navigation'><a rel="index" title="Index"
103 href="genindex.html"><img src='../icons/index.png'
104 border='0' height='32' alt='Index' width='32' /></A></td>
105</tr></table>
106<div class='online-navigation'>
107<b class="navlabel">Previous:</b>
108<a class="sectref" rel="prev" href="describing-extensions.html">2.3 Describing extension modules</A>
109<b class="navlabel">Up:</b>
110<a class="sectref" rel="parent" href="setup-script.html">2. Writing the Setup</A>
111<b class="navlabel">Next:</b>
112<a class="sectref" rel="next" href="node11.html">2.5 Installing Package Data</A>
113</div>
114</div>
115<hr />
116<span class="release-info">Release 2.4.2, documentation updated on 28 September 2005.</span>
117</DIV>
118<!--End of Navigation Panel-->
119<ADDRESS>
120See <i><a href="about.html">About this document...</a></i> for information on suggesting changes.
121</ADDRESS>
122</BODY>
123</HTML>