Merge lp:~al-maisan/py-script/doc-500616 into lp:py-script

Proposed by Muharem Hrnjadovic on 2009-12-26
Status: Merged
Approved by: Muharem Hrnjadovic on 2009-12-26
Approved revision: not available
Merged at revision: not available
Proposed branch: lp:~al-maisan/py-script/doc-500616
Merge into: lp:py-script
Diff against target: 5792 lines (+1135/-2589)
21 files modified
doc/html/api-objects.txt (+0/-6)
doc/html/class-tree.html (+0/-132)
doc/html/epydoc.css (+0/-312)
doc/html/epydoc.js (+0/-280)
doc/html/frames.html (+0/-17)
doc/html/help.html (+0/-278)
doc/html/identifier-index.html (+0/-181)
doc/html/index.html (+0/-17)
doc/html/module-tree.html (+0/-115)
doc/html/redirect.html (+0/-38)
doc/html/scriptutil-module.html (+0/-509)
doc/html/scriptutil-pysrc.html (+0/-388)
doc/html/scriptutil.ScriptError-class.html (+0/-197)
doc/html/scriptutil.find-module.html (+494/-0)
doc/html/scriptutil.find-pysrc.html (+390/-0)
doc/html/scriptutil.find.ScriptError-class.html (+202/-0)
doc/html/toc-everything.html (+0/-37)
doc/html/toc-scriptutil-module.html (+0/-37)
doc/html/toc-scriptutil.find-module.html (+38/-0)
doc/html/toc.html (+0/-34)
src/scriptutil/find.py (+11/-11)
To merge this branch: bzr merge lp:~al-maisan/py-script/doc-500616
Reviewer Review Type Date Requested Status
Muharem Hrnjadovic Approve on 2009-12-26
Review via email: mp+16602@code.launchpad.net

Commit message

HTML doc re-generated.

To post a comment you must log in.
Muharem Hrnjadovic (al-maisan) wrote :

HTML doc re-generated.

Muharem Hrnjadovic (al-maisan) wrote :

Looks good!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added directory 'doc/html'
2=== removed directory 'doc/html'
3=== added file 'doc/html/api-objects.txt'
4--- doc/html/api-objects.txt 1970-01-01 00:00:00 +0000
5+++ doc/html/api-objects.txt 2009-12-26 22:06:14 +0000
6@@ -0,0 +1,9 @@
7+scriptutil scriptutil-module.html
8+scriptutil.__package__ scriptutil-module.html#__package__
9+scriptutil.find scriptutil.find-module.html
10+scriptutil.find.grep scriptutil.find-module.html#grep
11+scriptutil.find.pprint scriptutil.find-module.html#pprint
12+scriptutil.find.__package__ scriptutil.find-module.html#__package__
13+scriptutil.find.replace scriptutil.find-module.html#replace
14+scriptutil.find.find scriptutil.find-module.html#find
15+scriptutil.find.ScriptError scriptutil.find.ScriptError-class.html
16
17=== removed file 'doc/html/api-objects.txt'
18--- doc/html/api-objects.txt 2009-12-26 20:49:38 +0000
19+++ doc/html/api-objects.txt 1970-01-01 00:00:00 +0000
20@@ -1,6 +0,0 @@
21-scriptutil scriptutil-module.html
22-scriptutil.printr scriptutil-module.html#printr
23-scriptutil.freplace scriptutil-module.html#freplace
24-scriptutil.ffind scriptutil-module.html#ffind
25-scriptutil.ffindgrep scriptutil-module.html#ffindgrep
26-scriptutil.ScriptError scriptutil.ScriptError-class.html
27
28=== added file 'doc/html/class-tree.html'
29--- doc/html/class-tree.html 1970-01-01 00:00:00 +0000
30+++ doc/html/class-tree.html 2009-12-26 22:06:14 +0000
31@@ -0,0 +1,132 @@
32+<?xml version="1.0" encoding="ascii"?>
33+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
34+ "DTD/xhtml1-transitional.dtd">
35+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
36+<head>
37+ <title>Class Hierarchy</title>
38+ <link rel="stylesheet" href="epydoc.css" type="text/css" />
39+ <script type="text/javascript" src="epydoc.js"></script>
40+</head>
41+
42+<body bgcolor="white" text="black" link="blue" vlink="#204080"
43+ alink="#204080">
44+<!-- ==================== NAVIGATION BAR ==================== -->
45+<table class="navbar" border="0" width="100%" cellpadding="0"
46+ bgcolor="#a0c0ff" cellspacing="0">
47+ <tr valign="middle">
48+ <!-- Home link -->
49+ <th>&nbsp;&nbsp;&nbsp;<a
50+ href="scriptutil-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
51+
52+ <!-- Tree link -->
53+ <th bgcolor="#70b0f0" class="navbar-select"
54+ >&nbsp;&nbsp;&nbsp;Trees&nbsp;&nbsp;&nbsp;</th>
55+
56+ <!-- Index link -->
57+ <th>&nbsp;&nbsp;&nbsp;<a
58+ href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
59+
60+ <!-- Help link -->
61+ <th>&nbsp;&nbsp;&nbsp;<a
62+ href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
63+
64+ <!-- Project homepage -->
65+ <th class="navbar" align="right" width="100%">
66+ <table border="0" cellpadding="0" cellspacing="0">
67+ <tr><th class="navbar" align="center"
68+ ><a class="navbar" target="_top" href="https://launchpad.net/py-script">Project Homepage</a></th>
69+ </tr></table></th>
70+ </tr>
71+</table>
72+<table width="100%" cellpadding="0" cellspacing="0">
73+ <tr valign="top">
74+ <td width="100%">&nbsp;</td>
75+ <td>
76+ <table cellpadding="0" cellspacing="0">
77+ <!-- hide/show private -->
78+ <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
79+ onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
80+ <tr><td align="right"><span class="options"
81+ >[<a href="frames.html" target="_top">frames</a
82+ >]&nbsp;|&nbsp;<a href="class-tree.html"
83+ target="_top">no&nbsp;frames</a>]</span></td></tr>
84+ </table>
85+ </td>
86+ </tr>
87+</table>
88+<center><b>
89+ [ <a href="module-tree.html">Module Hierarchy</a>
90+ | <a href="class-tree.html">Class Hierarchy</a> ]
91+</b></center><br />
92+<h1 class="epydoc">Class Hierarchy</h1>
93+<ul class="nomargin-top">
94+ <li> <strong class="uidlink">object</strong>:
95+ <em class="summary">The most base type</em>
96+ <ul>
97+ <li> <strong class="uidlink">exceptions.BaseException</strong>:
98+ <em class="summary">Common base class for all exceptions</em>
99+ <ul>
100+ <li> <strong class="uidlink">exceptions.Exception</strong>:
101+ <em class="summary">Common base class for all non-exit exceptions.</em>
102+ <ul>
103+ <li> <strong class="uidlink"><a href="scriptutil.find.ScriptError-class.html">scriptutil.find.ScriptError</a></strong>:
104+ <em class="summary">The exception raised in case of failures.</em>
105+ </li>
106+ </ul>
107+ </li>
108+ </ul>
109+ </li>
110+ </ul>
111+ </li>
112+</ul>
113+<!-- ==================== NAVIGATION BAR ==================== -->
114+<table class="navbar" border="0" width="100%" cellpadding="0"
115+ bgcolor="#a0c0ff" cellspacing="0">
116+ <tr valign="middle">
117+ <!-- Home link -->
118+ <th>&nbsp;&nbsp;&nbsp;<a
119+ href="scriptutil-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
120+
121+ <!-- Tree link -->
122+ <th bgcolor="#70b0f0" class="navbar-select"
123+ >&nbsp;&nbsp;&nbsp;Trees&nbsp;&nbsp;&nbsp;</th>
124+
125+ <!-- Index link -->
126+ <th>&nbsp;&nbsp;&nbsp;<a
127+ href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
128+
129+ <!-- Help link -->
130+ <th>&nbsp;&nbsp;&nbsp;<a
131+ href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
132+
133+ <!-- Project homepage -->
134+ <th class="navbar" align="right" width="100%">
135+ <table border="0" cellpadding="0" cellspacing="0">
136+ <tr><th class="navbar" align="center"
137+ ><a class="navbar" target="_top" href="https://launchpad.net/py-script">Project Homepage</a></th>
138+ </tr></table></th>
139+ </tr>
140+</table>
141+<table border="0" cellpadding="0" cellspacing="0" width="100%%">
142+ <tr>
143+ <td align="left" class="footer">
144+ Generated by Epydoc 3.0.1 on Sat Dec 26 23:01:34 2009
145+ </td>
146+ <td align="right" class="footer">
147+ <a target="mainFrame" href="http://epydoc.sourceforge.net"
148+ >http://epydoc.sourceforge.net</a>
149+ </td>
150+ </tr>
151+</table>
152+
153+<script type="text/javascript">
154+ <!--
155+ // Private objects are initially displayed (because if
156+ // javascript is turned off then we want them to be
157+ // visible); but by default, we want to hide them. So hide
158+ // them unless we have a cookie that says to show them.
159+ checkCookie();
160+ // -->
161+</script>
162+</body>
163+</html>
164
165=== removed file 'doc/html/class-tree.html'
166--- doc/html/class-tree.html 2009-12-26 20:49:38 +0000
167+++ doc/html/class-tree.html 1970-01-01 00:00:00 +0000
168@@ -1,132 +0,0 @@
169-<?xml version="1.0" encoding="ascii"?>
170-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
171- "DTD/xhtml1-transitional.dtd">
172-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
173-<head>
174- <title>Class Hierarchy</title>
175- <link rel="stylesheet" href="epydoc.css" type="text/css" />
176- <script type="text/javascript" src="epydoc.js"></script>
177-</head>
178-
179-<body bgcolor="white" text="black" link="blue" vlink="#204080"
180- alink="#204080">
181-<!-- ==================== NAVIGATION BAR ==================== -->
182-<table class="navbar" border="0" width="100%" cellpadding="0"
183- bgcolor="#a0c0ff" cellspacing="0">
184- <tr valign="middle">
185- <!-- Home link -->
186- <th>&nbsp;&nbsp;&nbsp;<a
187- href="scriptutil-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
188-
189- <!-- Tree link -->
190- <th bgcolor="#70b0f0" class="navbar-select"
191- >&nbsp;&nbsp;&nbsp;Trees&nbsp;&nbsp;&nbsp;</th>
192-
193- <!-- Index link -->
194- <th>&nbsp;&nbsp;&nbsp;<a
195- href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
196-
197- <!-- Help link -->
198- <th>&nbsp;&nbsp;&nbsp;<a
199- href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
200-
201- <!-- Project homepage -->
202- <th class="navbar" align="right" width="100%">
203- <table border="0" cellpadding="0" cellspacing="0">
204- <tr><th class="navbar" align="center"
205- ><a class="navbar" target="_top" href="http://hrnjad.net/src/scriptutil">Module scriptutil</a></th>
206- </tr></table></th>
207- </tr>
208-</table>
209-<table width="100%" cellpadding="0" cellspacing="0">
210- <tr valign="top">
211- <td width="100%">&nbsp;</td>
212- <td>
213- <table cellpadding="0" cellspacing="0">
214- <!-- hide/show private -->
215- <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
216- onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
217- <tr><td align="right"><span class="options"
218- >[<a href="frames.html" target="_top">frames</a
219- >]&nbsp;|&nbsp;<a href="class-tree.html"
220- target="_top">no&nbsp;frames</a>]</span></td></tr>
221- </table>
222- </td>
223- </tr>
224-</table>
225-<center><b>
226- [ <a href="module-tree.html">Module Hierarchy</a>
227- | <a href="class-tree.html">Class Hierarchy</a> ]
228-</b></center><br />
229-<h1 class="epydoc">Class Hierarchy</h1>
230-<ul class="nomargin-top">
231- <li> <strong class="uidlink">object</strong>:
232- <em class="summary">The most base type</em>
233- <ul>
234- <li> <strong class="uidlink">exceptions.BaseException</strong>:
235- <em class="summary">Common base class for all exceptions</em>
236- <ul>
237- <li> <strong class="uidlink">exceptions.Exception</strong>:
238- <em class="summary">Common base class for all non-exit exceptions.</em>
239- <ul>
240- <li> <strong class="uidlink"><a href="scriptutil.ScriptError-class.html">scriptutil.ScriptError</a></strong>:
241- <em class="summary">The exception raised in case of failures.</em>
242- </li>
243- </ul>
244- </li>
245- </ul>
246- </li>
247- </ul>
248- </li>
249-</ul>
250-<!-- ==================== NAVIGATION BAR ==================== -->
251-<table class="navbar" border="0" width="100%" cellpadding="0"
252- bgcolor="#a0c0ff" cellspacing="0">
253- <tr valign="middle">
254- <!-- Home link -->
255- <th>&nbsp;&nbsp;&nbsp;<a
256- href="scriptutil-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
257-
258- <!-- Tree link -->
259- <th bgcolor="#70b0f0" class="navbar-select"
260- >&nbsp;&nbsp;&nbsp;Trees&nbsp;&nbsp;&nbsp;</th>
261-
262- <!-- Index link -->
263- <th>&nbsp;&nbsp;&nbsp;<a
264- href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
265-
266- <!-- Help link -->
267- <th>&nbsp;&nbsp;&nbsp;<a
268- href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
269-
270- <!-- Project homepage -->
271- <th class="navbar" align="right" width="100%">
272- <table border="0" cellpadding="0" cellspacing="0">
273- <tr><th class="navbar" align="center"
274- ><a class="navbar" target="_top" href="http://hrnjad.net/src/scriptutil">Module scriptutil</a></th>
275- </tr></table></th>
276- </tr>
277-</table>
278-<table border="0" cellpadding="0" cellspacing="0" width="100%%">
279- <tr>
280- <td align="left" class="footer">
281- Generated by Epydoc 3.0beta1 on Thu May 22 18:10:51 2008
282- </td>
283- <td align="right" class="footer">
284- <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
285- </td>
286- </tr>
287-</table>
288-
289-<script type="text/javascript">
290- <!--
291- // Private objects are initially displayed (because if
292- // javascript is turned off then we want them to be
293- // visible); but by default, we want to hide them. So hide
294- // them unless we have a cookie that says to show them.
295- checkCookie()
296- // -->
297-</script>
298-
299-</body>
300-</html>
301
302=== added file 'doc/html/crarr.png'
303Binary files doc/html/crarr.png 1970-01-01 00:00:00 +0000 and doc/html/crarr.png 2009-12-26 22:06:14 +0000 differ
304=== removed file 'doc/html/crarr.png'
305Binary files doc/html/crarr.png 2009-12-26 20:49:38 +0000 and doc/html/crarr.png 1970-01-01 00:00:00 +0000 differ
306=== added file 'doc/html/epydoc.css'
307--- doc/html/epydoc.css 1970-01-01 00:00:00 +0000
308+++ doc/html/epydoc.css 2009-12-26 22:06:14 +0000
309@@ -0,0 +1,322 @@
310+
311+
312+/* Epydoc CSS Stylesheet
313+ *
314+ * This stylesheet can be used to customize the appearance of epydoc's
315+ * HTML output.
316+ *
317+ */
318+
319+/* Default Colors & Styles
320+ * - Set the default foreground & background color with 'body'; and
321+ * link colors with 'a:link' and 'a:visited'.
322+ * - Use bold for decision list terms.
323+ * - The heading styles defined here are used for headings *within*
324+ * docstring descriptions. All headings used by epydoc itself use
325+ * either class='epydoc' or class='toc' (CSS styles for both
326+ * defined below).
327+ */
328+body { background: #ffffff; color: #000000; }
329+p { margin-top: 0.5em; margin-bottom: 0.5em; }
330+a:link { color: #0000ff; }
331+a:visited { color: #204080; }
332+dt { font-weight: bold; }
333+h1 { font-size: +140%; font-style: italic;
334+ font-weight: bold; }
335+h2 { font-size: +125%; font-style: italic;
336+ font-weight: bold; }
337+h3 { font-size: +110%; font-style: italic;
338+ font-weight: normal; }
339+code { font-size: 100%; }
340+/* N.B.: class, not pseudoclass */
341+a.link { font-family: monospace; }
342+
343+/* Page Header & Footer
344+ * - The standard page header consists of a navigation bar (with
345+ * pointers to standard pages such as 'home' and 'trees'); a
346+ * breadcrumbs list, which can be used to navigate to containing
347+ * classes or modules; options links, to show/hide private
348+ * variables and to show/hide frames; and a page title (using
349+ * <h1>). The page title may be followed by a link to the
350+ * corresponding source code (using 'span.codelink').
351+ * - The footer consists of a navigation bar, a timestamp, and a
352+ * pointer to epydoc's homepage.
353+ */
354+h1.epydoc { margin: 0; font-size: +140%; font-weight: bold; }
355+h2.epydoc { font-size: +130%; font-weight: bold; }
356+h3.epydoc { font-size: +115%; font-weight: bold;
357+ margin-top: 0.2em; }
358+td h3.epydoc { font-size: +115%; font-weight: bold;
359+ margin-bottom: 0; }
360+table.navbar { background: #a0c0ff; color: #000000;
361+ border: 2px groove #c0d0d0; }
362+table.navbar table { color: #000000; }
363+th.navbar-select { background: #70b0ff;
364+ color: #000000; }
365+table.navbar a { text-decoration: none; }
366+table.navbar a:link { color: #0000ff; }
367+table.navbar a:visited { color: #204080; }
368+span.breadcrumbs { font-size: 85%; font-weight: bold; }
369+span.options { font-size: 70%; }
370+span.codelink { font-size: 85%; }
371+td.footer { font-size: 85%; }
372+
373+/* Table Headers
374+ * - Each summary table and details section begins with a 'header'
375+ * row. This row contains a section title (marked by
376+ * 'span.table-header') as well as a show/hide private link
377+ * (marked by 'span.options', defined above).
378+ * - Summary tables that contain user-defined groups mark those
379+ * groups using 'group header' rows.
380+ */
381+td.table-header { background: #70b0ff; color: #000000;
382+ border: 1px solid #608090; }
383+td.table-header table { color: #000000; }
384+td.table-header table a:link { color: #0000ff; }
385+td.table-header table a:visited { color: #204080; }
386+span.table-header { font-size: 120%; font-weight: bold; }
387+th.group-header { background: #c0e0f8; color: #000000;
388+ text-align: left; font-style: italic;
389+ font-size: 115%;
390+ border: 1px solid #608090; }
391+
392+/* Summary Tables (functions, variables, etc)
393+ * - Each object is described by a single row of the table with
394+ * two cells. The left cell gives the object's type, and is
395+ * marked with 'code.summary-type'. The right cell gives the
396+ * object's name and a summary description.
397+ * - CSS styles for the table's header and group headers are
398+ * defined above, under 'Table Headers'
399+ */
400+table.summary { border-collapse: collapse;
401+ background: #e8f0f8; color: #000000;
402+ border: 1px solid #608090;
403+ margin-bottom: 0.5em; }
404+td.summary { border: 1px solid #608090; }
405+code.summary-type { font-size: 85%; }
406+table.summary a:link { color: #0000ff; }
407+table.summary a:visited { color: #204080; }
408+
409+
410+/* Details Tables (functions, variables, etc)
411+ * - Each object is described in its own div.
412+ * - A single-row summary table w/ table-header is used as
413+ * a header for each details section (CSS style for table-header
414+ * is defined above, under 'Table Headers').
415+ */
416+table.details { border-collapse: collapse;
417+ background: #e8f0f8; color: #000000;
418+ border: 1px solid #608090;
419+ margin: .2em 0 0 0; }
420+table.details table { color: #000000; }
421+table.details a:link { color: #0000ff; }
422+table.details a:visited { color: #204080; }
423+
424+/* Fields */
425+dl.fields { margin-left: 2em; margin-top: 1em;
426+ margin-bottom: 1em; }
427+dl.fields dd ul { margin-left: 0em; padding-left: 0em; }
428+dl.fields dd ul li ul { margin-left: 2em; padding-left: 0em; }
429+div.fields { margin-left: 2em; }
430+div.fields p { margin-bottom: 0.5em; }
431+
432+/* Index tables (identifier index, term index, etc)
433+ * - link-index is used for indices containing lists of links
434+ * (namely, the identifier index & term index).
435+ * - index-where is used in link indices for the text indicating
436+ * the container/source for each link.
437+ * - metadata-index is used for indices containing metadata
438+ * extracted from fields (namely, the bug index & todo index).
439+ */
440+table.link-index { border-collapse: collapse;
441+ background: #e8f0f8; color: #000000;
442+ border: 1px solid #608090; }
443+td.link-index { border-width: 0px; }
444+table.link-index a:link { color: #0000ff; }
445+table.link-index a:visited { color: #204080; }
446+span.index-where { font-size: 70%; }
447+table.metadata-index { border-collapse: collapse;
448+ background: #e8f0f8; color: #000000;
449+ border: 1px solid #608090;
450+ margin: .2em 0 0 0; }
451+td.metadata-index { border-width: 1px; border-style: solid; }
452+table.metadata-index a:link { color: #0000ff; }
453+table.metadata-index a:visited { color: #204080; }
454+
455+/* Function signatures
456+ * - sig* is used for the signature in the details section.
457+ * - .summary-sig* is used for the signature in the summary
458+ * table, and when listing property accessor functions.
459+ * */
460+.sig-name { color: #006080; }
461+.sig-arg { color: #008060; }
462+.sig-default { color: #602000; }
463+.summary-sig { font-family: monospace; }
464+.summary-sig-name { color: #006080; font-weight: bold; }
465+table.summary a.summary-sig-name:link
466+ { color: #006080; font-weight: bold; }
467+table.summary a.summary-sig-name:visited
468+ { color: #006080; font-weight: bold; }
469+.summary-sig-arg { color: #006040; }
470+.summary-sig-default { color: #501800; }
471+
472+/* Subclass list
473+ */
474+ul.subclass-list { display: inline; }
475+ul.subclass-list li { display: inline; }
476+
477+/* To render variables, classes etc. like functions */
478+table.summary .summary-name { color: #006080; font-weight: bold;
479+ font-family: monospace; }
480+table.summary
481+ a.summary-name:link { color: #006080; font-weight: bold;
482+ font-family: monospace; }
483+table.summary
484+ a.summary-name:visited { color: #006080; font-weight: bold;
485+ font-family: monospace; }
486+
487+/* Variable values
488+ * - In the 'variable details' sections, each varaible's value is
489+ * listed in a 'pre.variable' box. The width of this box is
490+ * restricted to 80 chars; if the value's repr is longer than
491+ * this it will be wrapped, using a backslash marked with
492+ * class 'variable-linewrap'. If the value's repr is longer
493+ * than 3 lines, the rest will be ellided; and an ellipsis
494+ * marker ('...' marked with 'variable-ellipsis') will be used.
495+ * - If the value is a string, its quote marks will be marked
496+ * with 'variable-quote'.
497+ * - If the variable is a regexp, it is syntax-highlighted using
498+ * the re* CSS classes.
499+ */
500+pre.variable { padding: .5em; margin: 0;
501+ background: #dce4ec; color: #000000;
502+ border: 1px solid #708890; }
503+.variable-linewrap { color: #604000; font-weight: bold; }
504+.variable-ellipsis { color: #604000; font-weight: bold; }
505+.variable-quote { color: #604000; font-weight: bold; }
506+.variable-group { color: #008000; font-weight: bold; }
507+.variable-op { color: #604000; font-weight: bold; }
508+.variable-string { color: #006030; }
509+.variable-unknown { color: #a00000; font-weight: bold; }
510+.re { color: #000000; }
511+.re-char { color: #006030; }
512+.re-op { color: #600000; }
513+.re-group { color: #003060; }
514+.re-ref { color: #404040; }
515+
516+/* Base tree
517+ * - Used by class pages to display the base class hierarchy.
518+ */
519+pre.base-tree { font-size: 80%; margin: 0; }
520+
521+/* Frames-based table of contents headers
522+ * - Consists of two frames: one for selecting modules; and
523+ * the other listing the contents of the selected module.
524+ * - h1.toc is used for each frame's heading
525+ * - h2.toc is used for subheadings within each frame.
526+ */
527+h1.toc { text-align: center; font-size: 105%;
528+ margin: 0; font-weight: bold;
529+ padding: 0; }
530+h2.toc { font-size: 100%; font-weight: bold;
531+ margin: 0.5em 0 0 -0.3em; }
532+
533+/* Syntax Highlighting for Source Code
534+ * - doctest examples are displayed in a 'pre.py-doctest' block.
535+ * If the example is in a details table entry, then it will use
536+ * the colors specified by the 'table pre.py-doctest' line.
537+ * - Source code listings are displayed in a 'pre.py-src' block.
538+ * Each line is marked with 'span.py-line' (used to draw a line
539+ * down the left margin, separating the code from the line
540+ * numbers). Line numbers are displayed with 'span.py-lineno'.
541+ * The expand/collapse block toggle button is displayed with
542+ * 'a.py-toggle' (Note: the CSS style for 'a.py-toggle' should not
543+ * modify the font size of the text.)
544+ * - If a source code page is opened with an anchor, then the
545+ * corresponding code block will be highlighted. The code
546+ * block's header is highlighted with 'py-highlight-hdr'; and
547+ * the code block's body is highlighted with 'py-highlight'.
548+ * - The remaining py-* classes are used to perform syntax
549+ * highlighting (py-string for string literals, py-name for names,
550+ * etc.)
551+ */
552+pre.py-doctest { padding: .5em; margin: 1em;
553+ background: #e8f0f8; color: #000000;
554+ border: 1px solid #708890; }
555+table pre.py-doctest { background: #dce4ec;
556+ color: #000000; }
557+pre.py-src { border: 2px solid #000000;
558+ background: #f0f0f0; color: #000000; }
559+.py-line { border-left: 2px solid #000000;
560+ margin-left: .2em; padding-left: .4em; }
561+.py-lineno { font-style: italic; font-size: 90%;
562+ padding-left: .5em; }
563+a.py-toggle { text-decoration: none; }
564+div.py-highlight-hdr { border-top: 2px solid #000000;
565+ border-bottom: 2px solid #000000;
566+ background: #d8e8e8; }
567+div.py-highlight { border-bottom: 2px solid #000000;
568+ background: #d0e0e0; }
569+.py-prompt { color: #005050; font-weight: bold;}
570+.py-more { color: #005050; font-weight: bold;}
571+.py-string { color: #006030; }
572+.py-comment { color: #003060; }
573+.py-keyword { color: #600000; }
574+.py-output { color: #404040; }
575+.py-name { color: #000050; }
576+.py-name:link { color: #000050 !important; }
577+.py-name:visited { color: #000050 !important; }
578+.py-number { color: #005000; }
579+.py-defname { color: #000060; font-weight: bold; }
580+.py-def-name { color: #000060; font-weight: bold; }
581+.py-base-class { color: #000060; }
582+.py-param { color: #000060; }
583+.py-docstring { color: #006030; }
584+.py-decorator { color: #804020; }
585+/* Use this if you don't want links to names underlined: */
586+/*a.py-name { text-decoration: none; }*/
587+
588+/* Graphs & Diagrams
589+ * - These CSS styles are used for graphs & diagrams generated using
590+ * Graphviz dot. 'img.graph-without-title' is used for bare
591+ * diagrams (to remove the border created by making the image
592+ * clickable).
593+ */
594+img.graph-without-title { border: none; }
595+img.graph-with-title { border: 1px solid #000000; }
596+span.graph-title { font-weight: bold; }
597+span.graph-caption { }
598+
599+/* General-purpose classes
600+ * - 'p.indent-wrapped-lines' defines a paragraph whose first line
601+ * is not indented, but whose subsequent lines are.
602+ * - The 'nomargin-top' class is used to remove the top margin (e.g.
603+ * from lists). The 'nomargin' class is used to remove both the
604+ * top and bottom margin (but not the left or right margin --
605+ * for lists, that would cause the bullets to disappear.)
606+ */
607+p.indent-wrapped-lines { padding: 0 0 0 7em; text-indent: -7em;
608+ margin: 0; }
609+.nomargin-top { margin-top: 0; }
610+.nomargin { margin-top: 0; margin-bottom: 0; }
611+
612+/* HTML Log */
613+div.log-block { padding: 0; margin: .5em 0 .5em 0;
614+ background: #e8f0f8; color: #000000;
615+ border: 1px solid #000000; }
616+div.log-error { padding: .1em .3em .1em .3em; margin: 4px;
617+ background: #ffb0b0; color: #000000;
618+ border: 1px solid #000000; }
619+div.log-warning { padding: .1em .3em .1em .3em; margin: 4px;
620+ background: #ffffb0; color: #000000;
621+ border: 1px solid #000000; }
622+div.log-info { padding: .1em .3em .1em .3em; margin: 4px;
623+ background: #b0ffb0; color: #000000;
624+ border: 1px solid #000000; }
625+h2.log-hdr { background: #70b0ff; color: #000000;
626+ margin: 0; padding: 0em 0.5em 0em 0.5em;
627+ border-bottom: 1px solid #000000; font-size: 110%; }
628+p.log { font-weight: bold; margin: .5em 0 .5em 0; }
629+tr.opt-changed { color: #000000; font-weight: bold; }
630+tr.opt-default { color: #606060; }
631+pre.log { margin: 0; padding: 0; padding-left: 1em; }
632
633=== removed file 'doc/html/epydoc.css'
634--- doc/html/epydoc.css 2009-12-26 20:49:38 +0000
635+++ doc/html/epydoc.css 1970-01-01 00:00:00 +0000
636@@ -1,312 +0,0 @@
637-
638-
639-/* Epydoc CSS Stylesheet
640- *
641- * This stylesheet can be used to customize the appearance of epydoc's
642- * HTML output.
643- *
644- */
645-
646-/* Default Colors & Styles
647- * - Set the default foreground & background color with 'body'; and
648- * link colors with 'a:link' and 'a:visited'.
649- * - Use bold for decision list terms.
650- * - The heading styles defined here are used for headings *within*
651- * docstring descriptions. All headings used by epydoc itself use
652- * either class='epydoc' or class='toc' (CSS styles for both
653- * defined below).
654- */
655-body { background: #ffffff; color: #000000; }
656-a:link { color: #0000ff; }
657-a:visited { color: #204080; }
658-dt { font-weight: bold; }
659-h1 { font-size: +140%; font-style: italic;
660- font-weight: bold; }
661-h2 { font-size: +125%; font-style: italic;
662- font-weight: bold; }
663-h3 { font-size: +110%; font-style: italic;
664- font-weight: normal; }
665-code { font-size: 100%; }
666-
667-/* Page Header & Footer
668- * - The standard page header consists of a navigation bar (with
669- * pointers to standard pages such as 'home' and 'trees'); a
670- * breadcrumbs list, which can be used to navigate to containing
671- * classes or modules; options links, to show/hide private
672- * variables and to show/hide frames; and a page title (using
673- * <h1>). The page title may be followed by a link to the
674- * corresponding source code (using 'span.codelink').
675- * - The footer consists of a navigation bar, a timestamp, and a
676- * pointer to epydoc's homepage.
677- */
678-h1.epydoc { margin: 0; font-size: +140%; font-weight: bold; }
679-h2.epydoc { font-size: +130%; font-weight: bold; }
680-h3.epydoc { font-size: +115%; font-weight: bold; }
681-td h3.epydoc { font-size: +115%; font-weight: bold;
682- margin-bottom: 0; }
683-table.navbar { background: #a0c0ff; color: #000000;
684- border: 2px groove #c0d0d0; }
685-table.navbar table { color: #000000; }
686-th.navbar-select { background: #70b0ff;
687- color: #000000; }
688-table.navbar a { text-decoration: none; }
689-table.navbar a:link { color: #0000ff; }
690-table.navbar a:visited { color: #204080; }
691-span.breadcrumbs { font-size: 85%; font-weight: bold; }
692-span.options { font-size: 70%; }
693-span.codelink { font-size: 85%; }
694-td.footer { font-size: 85%; }
695-
696-/* Table Headers
697- * - Each summary table and details section begins with a 'header'
698- * row. This row contains a section title (marked by
699- * 'span.table-header') as well as a show/hide private link
700- * (marked by 'span.options', defined above).
701- * - Summary tables that contain user-defined groups mark those
702- * groups using 'group header' rows.
703- */
704-td.table-header { background: #70b0ff; color: #000000;
705- border: 1px solid #608090; }
706-td.table-header table { color: #000000; }
707-td.table-header table a:link { color: #0000ff; }
708-td.table-header table a:visited { color: #204080; }
709-span.table-header { font-size: 120%; font-weight: bold; }
710-th.group-header { background: #c0e0f8; color: #000000;
711- text-align: left; font-style: italic;
712- font-size: 115%;
713- border: 1px solid #608090; }
714-
715-/* Summary Tables (functions, variables, etc)
716- * - Each object is described by a single row of the table with
717- * two cells. The left cell gives the object's type, and is
718- * marked with 'code.summary-type'. The right cell gives the
719- * object's name and a summary description.
720- * - CSS styles for the table's header and group headers are
721- * defined above, under 'Table Headers'
722- */
723-table.summary { border-collapse: collapse;
724- background: #e8f0f8; color: #000000;
725- border: 1px solid #608090;
726- margin-bottom: 0.5em; }
727-td.summary { border: 1px solid #608090; }
728-code.summary-type { font-size: 85%; }
729-table.summary a:link { color: #0000ff; }
730-table.summary a:visited { color: #204080; }
731-
732-
733-/* Details Tables (functions, variables, etc)
734- * - Each object is described in its own div.
735- * - A single-row summary table w/ table-header is used as
736- * a header for each details section (CSS style for table-header
737- * is defined above, under 'Table Headers').
738- */
739-table.details { border-collapse: collapse;
740- background: #e8f0f8; color: #000000;
741- border: 1px solid #608090;
742- margin: .2em 0 0 0; }
743-table.details table { color: #000000; }
744-table.details a:link { color: #0000ff; }
745-table.details a:visited { color: #204080; }
746-
747-/* Fields */
748-dl.fields { margin-left: 2em; margin-top: 1em;
749- margin-bottom: 1em; }
750-dl.fields dd ul { margin-left: 0em; padding-left: 0em; }
751-div.fields { margin-left: 2em; }
752-div.fields p { margin-bottom: 0.5em; }
753-
754-/* Index tables (identifier index, term index, etc)
755- * - link-index is used for indices containing lists of links
756- * (namely, the identifier index & term index).
757- * - index-where is used in link indices for the text indicating
758- * the container/source for each link.
759- * - metadata-index is used for indices containing metadata
760- * extracted from fields (namely, the bug index & todo index).
761- */
762-table.link-index { border-collapse: collapse;
763- background: #e8f0f8; color: #000000;
764- border: 1px solid #608090; }
765-td.link-index { border-width: 0px; }
766-table.link-index a:link { color: #0000ff; }
767-table.link-index a:visited { color: #204080; }
768-span.index-where { font-size: 70%; }
769-table.metadata-index { border-collapse: collapse;
770- background: #e8f0f8; color: #000000;
771- border: 1px solid #608090;
772- margin: .2em 0 0 0; }
773-td.metadata-index { border-width: 1px; border-style: solid; }
774-table.metadata-index a:link { color: #0000ff; }
775-table.metadata-index a:visited { color: #204080; }
776-
777-/* Function signatures
778- * - sig* is used for the signature in the details section.
779- * - .summary-sig* is used for the signature in the summary
780- * table, and when listing property accessor functions.
781- * */
782-.sig-name { color: #006080; }
783-.sig-arg { color: #008060; }
784-.sig-default { color: #602000; }
785-.summary-sig { font-family: monospace; }
786-.summary-sig-name { color: #006080; font-weight: bold; }
787-table.summary a.summary-sig-name:link
788- { color: #006080; font-weight: bold; }
789-table.summary a.summary-sig-name:visited
790- { color: #006080; font-weight: bold; }
791-.summary-sig-arg { color: #006040; }
792-.summary-sig-default { color: #501800; }
793-
794-/* To render variables, classes etc. like functions */
795-table.summary .summary-name { color: #006080; font-weight: bold;
796- font-family: monospace; }
797-table.summary
798- a.summary-name:link { color: #006080; font-weight: bold;
799- font-family: monospace; }
800-table.summary
801- a.summary-name:visited { color: #006080; font-weight: bold;
802- font-family: monospace; }
803-
804-/* Variable values
805- * - In the 'variable details' sections, each varaible's value is
806- * listed in a 'pre.variable' box. The width of this box is
807- * restricted to 80 chars; if the value's repr is longer than
808- * this it will be wrapped, using a backslash marked with
809- * class 'variable-linewrap'. If the value's repr is longer
810- * than 3 lines, the rest will be ellided; and an ellipsis
811- * marker ('...' marked with 'variable-ellipsis') will be used.
812- * - If the value is a string, its quote marks will be marked
813- * with 'variable-quote'.
814- * - If the variable is a regexp, it is syntax-highlighted using
815- * the re* CSS classes.
816- */
817-pre.variable { padding: .5em; margin: 0;
818- background: #dce4ec; color: #000000;
819- border: 1px solid #708890; }
820-.variable-linewrap { color: #604000; font-weight: bold; }
821-.variable-ellipsis { color: #604000; font-weight: bold; }
822-.variable-quote { color: #604000; font-weight: bold; }
823-.variable-group { color: #008000; font-weight: bold; }
824-.variable-op { color: #604000; font-weight: bold; }
825-.variable-string { color: #006030; }
826-.variable-unknown { color: #a00000; font-weight: bold; }
827-.re { color: #000000; }
828-.re-char { color: #006030; }
829-.re-op { color: #600000; }
830-.re-group { color: #003060; }
831-.re-ref { color: #404040; }
832-
833-/* Base tree
834- * - Used by class pages to display the base class hierarchy.
835- */
836-pre.base-tree { font-size: 80%; margin: 0; }
837-
838-/* Frames-based table of contents headers
839- * - Consists of two frames: one for selecting modules; and
840- * the other listing the contents of the selected module.
841- * - h1.toc is used for each frame's heading
842- * - h2.toc is used for subheadings within each frame.
843- */
844-h1.toc { text-align: center; font-size: 105%;
845- margin: 0; font-weight: bold;
846- padding: 0; }
847-h2.toc { font-size: 100%; font-weight: bold;
848- margin: 0.5em 0 0 -0.3em; }
849-
850-/* Syntax Highlighting for Source Code
851- * - doctest examples are displayed in a 'pre.py-doctest' block.
852- * If the example is in a details table entry, then it will use
853- * the colors specified by the 'table pre.py-doctest' line.
854- * - Source code listings are displayed in a 'pre.py-src' block.
855- * Each line is marked with 'span.py-line' (used to draw a line
856- * down the left margin, separating the code from the line
857- * numbers). Line numbers are displayed with 'span.py-lineno'.
858- * The expand/collapse block toggle button is displayed with
859- * 'a.py-toggle' (Note: the CSS style for 'a.py-toggle' should not
860- * modify the font size of the text.)
861- * - If a source code page is opened with an anchor, then the
862- * corresponding code block will be highlighted. The code
863- * block's header is highlighted with 'py-highlight-hdr'; and
864- * the code block's body is highlighted with 'py-highlight'.
865- * - The remaining py-* classes are used to perform syntax
866- * highlighting (py-string for string literals, py-name for names,
867- * etc.)
868- */
869-pre.py-doctest { padding: .5em; margin: 1em;
870- background: #e8f0f8; color: #000000;
871- border: 1px solid #708890; }
872-table pre.py-doctest { background: #dce4ec;
873- color: #000000; }
874-pre.py-src { border: 2px solid #000000;
875- background: #f0f0f0; color: #000000; }
876-.py-line { border-left: 2px solid #000000;
877- margin-left: .2em; padding-left: .4em; }
878-.py-lineno { font-style: italic; font-size: 90%;
879- padding-left: .5em; }
880-a.py-toggle { text-decoration: none; }
881-div.py-highlight-hdr { border-top: 2px solid #000000;
882- border-bottom: 2px solid #000000;
883- background: #d8e8e8; }
884-div.py-highlight { border-bottom: 2px solid #000000;
885- background: #d0e0e0; }
886-.py-prompt { color: #005050; font-weight: bold;}
887-.py-more { color: #005050; font-weight: bold;}
888-.py-string { color: #006030; }
889-.py-comment { color: #003060; }
890-.py-keyword { color: #600000; }
891-.py-output { color: #404040; }
892-.py-name { color: #000050; }
893-.py-name:link { color: #000050 !important; }
894-.py-name:visited { color: #000050 !important; }
895-.py-number { color: #005000; }
896-.py-defname { color: #000060; font-weight: bold; }
897-.py-def-name { color: #000060; font-weight: bold; }
898-.py-base-class { color: #000060; }
899-.py-param { color: #000060; }
900-.py-docstring { color: #006030; }
901-.py-decorator { color: #804020; }
902-/* Use this if you don't want links to names underlined: */
903-/*a.py-name { text-decoration: none; }*/
904-
905-/* Graphs & Diagrams
906- * - These CSS styles are used for graphs & diagrams generated using
907- * Graphviz dot. 'img.graph-without-title' is used for bare
908- * diagrams (to remove the border created by making the image
909- * clickable).
910- */
911-img.graph-without-title { border: none; }
912-img.graph-with-title { border: 1px solid #000000; }
913-span.graph-title { font-weight: bold; }
914-span.graph-caption { }
915-
916-/* General-purpose classes
917- * - 'p.indent-wrapped-lines' defines a paragraph whose first line
918- * is not indented, but whose subsequent lines are.
919- * - The 'nomargin-top' class is used to remove the top margin (e.g.
920- * from lists). The 'nomargin' class is used to remove both the
921- * top and bottom margin (but not the left or right margin --
922- * for lists, that would cause the bullets to disappear.)
923- */
924-p.indent-wrapped-lines { padding: 0 0 0 7em; text-indent: -7em;
925- margin: 0; }
926-.nomargin-top { margin-top: 0; }
927-.nomargin { margin-top: 0; margin-bottom: 0; }
928-
929-/* HTML Log */
930-div.log-block { padding: 0; margin: .5em 0 .5em 0;
931- background: #e8f0f8; color: #000000;
932- border: 1px solid #000000; }
933-div.log-error { padding: .1em .3em .1em .3em; margin: 4px;
934- background: #ffb0b0; color: #000000;
935- border: 1px solid #000000; }
936-div.log-warning { padding: .1em .3em .1em .3em; margin: 4px;
937- background: #ffffb0; color: #000000;
938- border: 1px solid #000000; }
939-div.log-info { padding: .1em .3em .1em .3em; margin: 4px;
940- background: #b0ffb0; color: #000000;
941- border: 1px solid #000000; }
942-h2.log-hdr { background: #70b0ff; color: #000000;
943- margin: 0; padding: 0em 0.5em 0em 0.5em;
944- border-bottom: 1px solid #000000; font-size: 110%; }
945-p.log { font-weight: bold; margin: .5em 0 .5em 0; }
946-tr.opt-changed { color: #000000; font-weight: bold; }
947-tr.opt-default { color: #606060; }
948-pre.log { margin: 0; padding: 0; padding-left: 1em; }
949
950=== added file 'doc/html/epydoc.js'
951--- doc/html/epydoc.js 1970-01-01 00:00:00 +0000
952+++ doc/html/epydoc.js 2009-12-26 22:06:14 +0000
953@@ -0,0 +1,293 @@
954+function toggle_private() {
955+ // Search for any private/public links on this page. Store
956+ // their old text in "cmd," so we will know what action to
957+ // take; and change their text to the opposite action.
958+ var cmd = "?";
959+ var elts = document.getElementsByTagName("a");
960+ for(var i=0; i<elts.length; i++) {
961+ if (elts[i].className == "privatelink") {
962+ cmd = elts[i].innerHTML;
963+ elts[i].innerHTML = ((cmd && cmd.substr(0,4)=="show")?
964+ "hide&nbsp;private":"show&nbsp;private");
965+ }
966+ }
967+ // Update all DIVs containing private objects.
968+ var elts = document.getElementsByTagName("div");
969+ for(var i=0; i<elts.length; i++) {
970+ if (elts[i].className == "private") {
971+ elts[i].style.display = ((cmd && cmd.substr(0,4)=="hide")?"none":"block");
972+ }
973+ else if (elts[i].className == "public") {
974+ elts[i].style.display = ((cmd && cmd.substr(0,4)=="hide")?"block":"none");
975+ }
976+ }
977+ // Update all table rows containing private objects. Note, we
978+ // use "" instead of "block" becaue IE & firefox disagree on what
979+ // this should be (block vs table-row), and "" just gives the
980+ // default for both browsers.
981+ var elts = document.getElementsByTagName("tr");
982+ for(var i=0; i<elts.length; i++) {
983+ if (elts[i].className == "private") {
984+ elts[i].style.display = ((cmd && cmd.substr(0,4)=="hide")?"none":"");
985+ }
986+ }
987+ // Update all list items containing private objects.
988+ var elts = document.getElementsByTagName("li");
989+ for(var i=0; i<elts.length; i++) {
990+ if (elts[i].className == "private") {
991+ elts[i].style.display = ((cmd && cmd.substr(0,4)=="hide")?
992+ "none":"");
993+ }
994+ }
995+ // Update all list items containing private objects.
996+ var elts = document.getElementsByTagName("ul");
997+ for(var i=0; i<elts.length; i++) {
998+ if (elts[i].className == "private") {
999+ elts[i].style.display = ((cmd && cmd.substr(0,4)=="hide")?"none":"block");
1000+ }
1001+ }
1002+ // Set a cookie to remember the current option.
1003+ document.cookie = "EpydocPrivate="+cmd;
1004+ }
1005+function show_private() {
1006+ var elts = document.getElementsByTagName("a");
1007+ for(var i=0; i<elts.length; i++) {
1008+ if (elts[i].className == "privatelink") {
1009+ cmd = elts[i].innerHTML;
1010+ if (cmd && cmd.substr(0,4)=="show")
1011+ toggle_private();
1012+ }
1013+ }
1014+ }
1015+function getCookie(name) {
1016+ var dc = document.cookie;
1017+ var prefix = name + "=";
1018+ var begin = dc.indexOf("; " + prefix);
1019+ if (begin == -1) {
1020+ begin = dc.indexOf(prefix);
1021+ if (begin != 0) return null;
1022+ } else
1023+ { begin += 2; }
1024+ var end = document.cookie.indexOf(";", begin);
1025+ if (end == -1)
1026+ { end = dc.length; }
1027+ return unescape(dc.substring(begin + prefix.length, end));
1028+ }
1029+function setFrame(url1, url2) {
1030+ parent.frames[1].location.href = url1;
1031+ parent.frames[2].location.href = url2;
1032+ }
1033+function checkCookie() {
1034+ var cmd=getCookie("EpydocPrivate");
1035+ if (cmd && cmd.substr(0,4)!="show" && location.href.indexOf("#_") < 0)
1036+ toggle_private();
1037+ }
1038+function toggleCallGraph(id) {
1039+ var elt = document.getElementById(id);
1040+ if (elt.style.display == "none")
1041+ elt.style.display = "block";
1042+ else
1043+ elt.style.display = "none";
1044+ }
1045+function expand(id) {
1046+ var elt = document.getElementById(id+"-expanded");
1047+ if (elt) elt.style.display = "block";
1048+ var elt = document.getElementById(id+"-expanded-linenums");
1049+ if (elt) elt.style.display = "block";
1050+ var elt = document.getElementById(id+"-collapsed");
1051+ if (elt) { elt.innerHTML = ""; elt.style.display = "none"; }
1052+ var elt = document.getElementById(id+"-collapsed-linenums");
1053+ if (elt) { elt.innerHTML = ""; elt.style.display = "none"; }
1054+ var elt = document.getElementById(id+"-toggle");
1055+ if (elt) { elt.innerHTML = "-"; }
1056+}
1057+
1058+function collapse(id) {
1059+ var elt = document.getElementById(id+"-expanded");
1060+ if (elt) elt.style.display = "none";
1061+ var elt = document.getElementById(id+"-expanded-linenums");
1062+ if (elt) elt.style.display = "none";
1063+ var elt = document.getElementById(id+"-collapsed-linenums");
1064+ if (elt) { elt.innerHTML = "<br />"; elt.style.display="block"; }
1065+ var elt = document.getElementById(id+"-toggle");
1066+ if (elt) { elt.innerHTML = "+"; }
1067+ var elt = document.getElementById(id+"-collapsed");
1068+ if (elt) {
1069+ elt.style.display = "block";
1070+
1071+ var indent = elt.getAttribute("indent");
1072+ var pad = elt.getAttribute("pad");
1073+ var s = "<tt class='py-lineno'>";
1074+ for (var i=0; i<pad.length; i++) { s += "&nbsp;" }
1075+ s += "</tt>";
1076+ s += "&nbsp;&nbsp;<tt class='py-line'>";
1077+ for (var i=0; i<indent.length; i++) { s += "&nbsp;" }
1078+ s += "<a href='#' onclick='expand(\"" + id;
1079+ s += "\");return false'>...</a></tt><br />";
1080+ elt.innerHTML = s;
1081+ }
1082+}
1083+
1084+function toggle(id) {
1085+ elt = document.getElementById(id+"-toggle");
1086+ if (elt.innerHTML == "-")
1087+ collapse(id);
1088+ else
1089+ expand(id);
1090+ return false;
1091+}
1092+
1093+function highlight(id) {
1094+ var elt = document.getElementById(id+"-def");
1095+ if (elt) elt.className = "py-highlight-hdr";
1096+ var elt = document.getElementById(id+"-expanded");
1097+ if (elt) elt.className = "py-highlight";
1098+ var elt = document.getElementById(id+"-collapsed");
1099+ if (elt) elt.className = "py-highlight";
1100+}
1101+
1102+function num_lines(s) {
1103+ var n = 1;
1104+ var pos = s.indexOf("\n");
1105+ while ( pos > 0) {
1106+ n += 1;
1107+ pos = s.indexOf("\n", pos+1);
1108+ }
1109+ return n;
1110+}
1111+
1112+// Collapse all blocks that mave more than `min_lines` lines.
1113+function collapse_all(min_lines) {
1114+ var elts = document.getElementsByTagName("div");
1115+ for (var i=0; i<elts.length; i++) {
1116+ var elt = elts[i];
1117+ var split = elt.id.indexOf("-");
1118+ if (split > 0)
1119+ if (elt.id.substring(split, elt.id.length) == "-expanded")
1120+ if (num_lines(elt.innerHTML) > min_lines)
1121+ collapse(elt.id.substring(0, split));
1122+ }
1123+}
1124+
1125+function expandto(href) {
1126+ var start = href.indexOf("#")+1;
1127+ if (start != 0 && start != href.length) {
1128+ if (href.substring(start, href.length) != "-") {
1129+ collapse_all(4);
1130+ pos = href.indexOf(".", start);
1131+ while (pos != -1) {
1132+ var id = href.substring(start, pos);
1133+ expand(id);
1134+ pos = href.indexOf(".", pos+1);
1135+ }
1136+ var id = href.substring(start, href.length);
1137+ expand(id);
1138+ highlight(id);
1139+ }
1140+ }
1141+}
1142+
1143+function kill_doclink(id) {
1144+ var parent = document.getElementById(id);
1145+ parent.removeChild(parent.childNodes.item(0));
1146+}
1147+function auto_kill_doclink(ev) {
1148+ if (!ev) var ev = window.event;
1149+ if (!this.contains(ev.toElement)) {
1150+ var parent = document.getElementById(this.parentID);
1151+ parent.removeChild(parent.childNodes.item(0));
1152+ }
1153+}
1154+
1155+function doclink(id, name, targets_id) {
1156+ var elt = document.getElementById(id);
1157+
1158+ // If we already opened the box, then destroy it.
1159+ // (This case should never occur, but leave it in just in case.)
1160+ if (elt.childNodes.length > 1) {
1161+ elt.removeChild(elt.childNodes.item(0));
1162+ }
1163+ else {
1164+ // The outer box: relative + inline positioning.
1165+ var box1 = document.createElement("div");
1166+ box1.style.position = "relative";
1167+ box1.style.display = "inline";
1168+ box1.style.top = 0;
1169+ box1.style.left = 0;
1170+
1171+ // A shadow for fun
1172+ var shadow = document.createElement("div");
1173+ shadow.style.position = "absolute";
1174+ shadow.style.left = "-1.3em";
1175+ shadow.style.top = "-1.3em";
1176+ shadow.style.background = "#404040";
1177+
1178+ // The inner box: absolute positioning.
1179+ var box2 = document.createElement("div");
1180+ box2.style.position = "relative";
1181+ box2.style.border = "1px solid #a0a0a0";
1182+ box2.style.left = "-.2em";
1183+ box2.style.top = "-.2em";
1184+ box2.style.background = "white";
1185+ box2.style.padding = ".3em .4em .3em .4em";
1186+ box2.style.fontStyle = "normal";
1187+ box2.onmouseout=auto_kill_doclink;
1188+ box2.parentID = id;
1189+
1190+ // Get the targets
1191+ var targets_elt = document.getElementById(targets_id);
1192+ var targets = targets_elt.getAttribute("targets");
1193+ var links = "";
1194+ target_list = targets.split(",");
1195+ for (var i=0; i<target_list.length; i++) {
1196+ var target = target_list[i].split("=");
1197+ links += "<li><a href='" + target[1] +
1198+ "' style='text-decoration:none'>" +
1199+ target[0] + "</a></li>";
1200+ }
1201+
1202+ // Put it all together.
1203+ elt.insertBefore(box1, elt.childNodes.item(0));
1204+ //box1.appendChild(box2);
1205+ box1.appendChild(shadow);
1206+ shadow.appendChild(box2);
1207+ box2.innerHTML =
1208+ "Which <b>"+name+"</b> do you want to see documentation for?" +
1209+ "<ul style='margin-bottom: 0;'>" +
1210+ links +
1211+ "<li><a href='#' style='text-decoration:none' " +
1212+ "onclick='kill_doclink(\""+id+"\");return false;'>"+
1213+ "<i>None of the above</i></a></li></ul>";
1214+ }
1215+ return false;
1216+}
1217+
1218+function get_anchor() {
1219+ var href = location.href;
1220+ var start = href.indexOf("#")+1;
1221+ if ((start != 0) && (start != href.length))
1222+ return href.substring(start, href.length);
1223+ }
1224+function redirect_url(dottedName) {
1225+ // Scan through each element of the "pages" list, and check
1226+ // if "name" matches with any of them.
1227+ for (var i=0; i<pages.length; i++) {
1228+
1229+ // Each page has the form "<pagename>-m" or "<pagename>-c";
1230+ // extract the <pagename> portion & compare it to dottedName.
1231+ var pagename = pages[i].substring(0, pages[i].length-2);
1232+ if (pagename == dottedName.substring(0,pagename.length)) {
1233+
1234+ // We've found a page that matches `dottedName`;
1235+ // construct its URL, using leftover `dottedName`
1236+ // content to form an anchor.
1237+ var pagetype = pages[i].charAt(pages[i].length-1);
1238+ var url = pagename + ((pagetype=="m")?"-module.html":
1239+ "-class.html");
1240+ if (dottedName.length > pagename.length)
1241+ url += "#" + dottedName.substring(pagename.length+1,
1242+ dottedName.length);
1243+ return url;
1244+ }
1245+ }
1246+ }
1247
1248=== removed file 'doc/html/epydoc.js'
1249--- doc/html/epydoc.js 2009-12-26 20:49:38 +0000
1250+++ doc/html/epydoc.js 1970-01-01 00:00:00 +0000
1251@@ -1,280 +0,0 @@
1252-function toggle_private() {
1253- // Search for any private/public links on this page. Store
1254- // their old text in "cmd," so we will know what action to
1255- // take; and change their text to the opposite action.
1256- var cmd = "?";
1257- var elts = document.getElementsByTagName("a");
1258- for(var i=0; i<elts.length; i++) {
1259- if (elts[i].className == "privatelink") {
1260- cmd = elts[i].innerHTML;
1261- elts[i].innerHTML = ((cmd && cmd.substr(0,4)=="show")?
1262- "hide&nbsp;private":"show&nbsp;private");
1263- }
1264- }
1265- // Update all DIVs containing private objects.
1266- var elts = document.getElementsByTagName("div");
1267- for(var i=0; i<elts.length; i++) {
1268- if (elts[i].className == "private") {
1269- elts[i].style.display = ((cmd && cmd.substr(0,4)=="hide")?"none":"block");
1270- }
1271- }
1272- // Update all table rowss containing private objects. Note, we
1273- // use "" instead of "block" becaue IE & firefox disagree on what
1274- // this should be (block vs table-row), and "" just gives the
1275- // default for both browsers.
1276- var elts = document.getElementsByTagName("tr");
1277- for(var i=0; i<elts.length; i++) {
1278- if (elts[i].className == "private") {
1279- elts[i].style.display = ((cmd && cmd.substr(0,4)=="hide")?"none":"");
1280- }
1281- }
1282- // Update all list items containing private objects.
1283- var elts = document.getElementsByTagName("li");
1284- for(var i=0; i<elts.length; i++) {
1285- if (elts[i].className == "private") {
1286- elts[i].style.display = ((cmd && cmd.substr(0,4)=="hide")?
1287- "none":"list-item");
1288- }
1289- }
1290- // Update all list items containing private objects.
1291- var elts = document.getElementsByTagName("ul");
1292- for(var i=0; i<elts.length; i++) {
1293- if (elts[i].className == "private") {
1294- elts[i].style.display = ((cmd && cmd.substr(0,4)=="hide")?"none":"block");
1295- }
1296- }
1297- // Set a cookie to remember the current option.
1298- document.cookie = "EpydocPrivate="+cmd;
1299- }
1300-function getCookie(name) {
1301- var dc = document.cookie;
1302- var prefix = name + "=";
1303- var begin = dc.indexOf("; " + prefix);
1304- if (begin == -1) {
1305- begin = dc.indexOf(prefix);
1306- if (begin != 0) return null;
1307- } else
1308- { begin += 2; }
1309- var end = document.cookie.indexOf(";", begin);
1310- if (end == -1)
1311- { end = dc.length; }
1312- return unescape(dc.substring(begin + prefix.length, end));
1313- }
1314-function setFrame(url1, url2) {
1315- parent.frames[1].location.href = url1;
1316- parent.frames[2].location.href = url2;
1317- }
1318-function checkCookie() {
1319- var cmd=getCookie("EpydocPrivate");
1320- if (cmd && cmd.substr(0,4)!="show" && location.href.indexOf("#_") < 0)
1321- toggle_private();
1322- }
1323-function toggleCallGraph(id) {
1324- var elt = document.getElementById(id);
1325- if (elt.style.display == "none")
1326- elt.style.display = "block";
1327- else
1328- elt.style.display = "none";
1329- }
1330-function expand(id) {
1331- var elt = document.getElementById(id+"-expanded");
1332- if (elt) elt.style.display = "block";
1333- var elt = document.getElementById(id+"-expanded-linenums");
1334- if (elt) elt.style.display = "block";
1335- var elt = document.getElementById(id+"-collapsed");
1336- if (elt) { elt.innerHTML = ""; elt.style.display = "none"; }
1337- var elt = document.getElementById(id+"-collapsed-linenums");
1338- if (elt) { elt.innerHTML = ""; elt.style.display = "none"; }
1339- var elt = document.getElementById(id+"-toggle");
1340- if (elt) { elt.innerHTML = "-"; }
1341-}
1342-
1343-function collapse(id) {
1344- var elt = document.getElementById(id+"-expanded");
1345- if (elt) elt.style.display = "none";
1346- var elt = document.getElementById(id+"-expanded-linenums");
1347- if (elt) elt.style.display = "none";
1348- var elt = document.getElementById(id+"-collapsed-linenums");
1349- if (elt) { elt.innerHTML = "<br/>"; elt.style.display="block"; }
1350- var elt = document.getElementById(id+"-toggle");
1351- if (elt) { elt.innerHTML = "+"; }
1352- var elt = document.getElementById(id+"-collapsed");
1353- if (elt) {
1354- elt.style.display = "block";
1355-
1356- var indent = elt.getAttribute("indent");
1357- var pad = elt.getAttribute("pad");
1358- var s = "<tt class='py-lineno'>";
1359- for (var i=0; i<pad.length; i++) { s += "&nbsp;" }
1360- s += "</tt>";
1361- s += "&nbsp;&nbsp;<tt class='py-line'>";
1362- for (var i=0; i<indent.length; i++) { s += "&nbsp;" }
1363- s += "<a href='#' onclick='expand(\"" + id;
1364- s += "\");return false'>...</a></tt><br />";
1365- elt.innerHTML = s;
1366- }
1367-}
1368-
1369-function toggle(id) {
1370- elt = document.getElementById(id+"-toggle");
1371- if (elt.innerHTML == "-")
1372- collapse(id);
1373- else
1374- expand(id);
1375- return false;
1376-}
1377-
1378-function highlight(id) {
1379- var elt = document.getElementById(id+"-def");
1380- if (elt) elt.className = "py-highlight-hdr";
1381- var elt = document.getElementById(id+"-expanded");
1382- if (elt) elt.className = "py-highlight";
1383- var elt = document.getElementById(id+"-collapsed");
1384- if (elt) elt.className = "py-highlight";
1385-}
1386-
1387-function num_lines(s) {
1388- var n = 1;
1389- var pos = s.indexOf("\n");
1390- while ( pos > 0) {
1391- n += 1;
1392- pos = s.indexOf("\n", pos+1);
1393- }
1394- return n;
1395-}
1396-
1397-// Collapse all blocks that mave more than `min_lines` lines.
1398-function collapse_all(min_lines) {
1399- var elts = document.getElementsByTagName("div");
1400- for (var i=0; i<elts.length; i++) {
1401- var elt = elts[i];
1402- var split = elt.id.indexOf("-");
1403- if (split > 0)
1404- if (elt.id.substring(split, elt.id.length) == "-expanded")
1405- if (num_lines(elt.innerHTML) > min_lines)
1406- collapse(elt.id.substring(0, split));
1407- }
1408-}
1409-
1410-function expandto(href) {
1411- var start = href.indexOf("#")+1;
1412- if (start != 0 && start != href.length) {
1413- if (href.substring(start, href.length) != "-") {
1414- collapse_all(4);
1415- pos = href.indexOf(".", start);
1416- while (pos != -1) {
1417- var id = href.substring(start, pos);
1418- expand(id);
1419- pos = href.indexOf(".", pos+1);
1420- }
1421- var id = href.substring(start, href.length);
1422- expand(id);
1423- highlight(id);
1424- }
1425- }
1426-}
1427-
1428-function kill_doclink(id) {
1429- var parent = document.getElementById(id);
1430- parent.removeChild(parent.childNodes.item(0));
1431-}
1432-function auto_kill_doclink(ev) {
1433- if (!ev) var ev = window.event;
1434- if (!this.contains(ev.toElement)) {
1435- var parent = document.getElementById(this.parentID);
1436- parent.removeChild(parent.childNodes.item(0));
1437- }
1438-}
1439-
1440-function doclink(id, name, targets_id) {
1441- var elt = document.getElementById(id);
1442-
1443- // If we already opened the box, then destroy it.
1444- // (This case should never occur, but leave it in just in case.)
1445- if (elt.childNodes.length > 1) {
1446- elt.removeChild(elt.childNodes.item(0));
1447- }
1448- else {
1449- // The outer box: relative + inline positioning.
1450- var box1 = document.createElement("div");
1451- box1.style.position = "relative";
1452- box1.style.display = "inline";
1453- box1.style.top = 0;
1454- box1.style.left = 0;
1455-
1456- // A shadow for fun
1457- var shadow = document.createElement("div");
1458- shadow.style.position = "absolute";
1459- shadow.style.left = "-1.3em";
1460- shadow.style.top = "-1.3em";
1461- shadow.style.background = "#404040";
1462-
1463- // The inner box: absolute positioning.
1464- var box2 = document.createElement("div");
1465- box2.style.position = "relative";
1466- box2.style.border = "1px solid #a0a0a0";
1467- box2.style.left = "-.2em";
1468- box2.style.top = "-.2em";
1469- box2.style.background = "white";
1470- box2.style.padding = ".3em .4em .3em .4em";
1471- box2.style.fontStyle = "normal";
1472- box2.onmouseout=auto_kill_doclink;
1473- box2.parentID = id;
1474-
1475- // Get the targets
1476- var targets_elt = document.getElementById(targets_id);
1477- var targets = targets_elt.getAttribute("targets");
1478- var links = "";
1479- target_list = targets.split(",");
1480- for (var i=0; i<target_list.length; i++) {
1481- var target = target_list[i].split("=");
1482- links += "<li><a href='" + target[1] +
1483- "' style='text-decoration:none'>" +
1484- target[0] + "</a></li>";
1485- }
1486-
1487- // Put it all together.
1488- elt.insertBefore(box1, elt.childNodes.item(0));
1489- //box1.appendChild(box2);
1490- box1.appendChild(shadow);
1491- shadow.appendChild(box2);
1492- box2.innerHTML =
1493- "Which <b>"+name+"</b> do you want to see documentation for?" +
1494- "<ul style='margin-bottom: 0;'>" +
1495- links +
1496- "<li><a href='#' style='text-decoration:none' " +
1497- "onclick='kill_doclink(\""+id+"\");return false;'>"+
1498- "<i>None of the above</i></a></li></ul>";
1499- }
1500- return false;
1501-}
1502-
1503-function get_anchor() {
1504- var href = location.href;
1505- var start = href.indexOf("#")+1;
1506- if ((start != 0) && (start != href.length))
1507- return href.substring(start, href.length);
1508- }
1509-function redirect_url(dottedName) {
1510- // Scan through each element of the "pages" list, and check
1511- // if "name" matches with any of them.
1512- for (var i=0; i<pages.length; i++) {
1513-
1514- // Each page has the form "<pagename>-m" or "<pagename>-c";
1515- // extract the <pagename> portion & compare it to dottedName.
1516- var pagename = pages[i].substring(0, pages[i].length-2);
1517- if (pagename == dottedName.substring(0,pagename.length)) {
1518-
1519- // We've found a page that matches `dottedName`;
1520- // construct its URL, using leftover `dottedName`
1521- // content to form an anchor.
1522- var pagetype = pages[i].charAt(pages[i].length-1);
1523- var url = pagename + ((pagetype=="m")?"-module.html":
1524- "-class.html");
1525- if (dottedName.length > pagename.length)
1526- url += "#" + dottedName.substring(pagename.length+1,
1527- dottedName.length);
1528- return url;
1529- }
1530- }
1531- }
1532
1533=== added file 'doc/html/frames.html'
1534--- doc/html/frames.html 1970-01-01 00:00:00 +0000
1535+++ doc/html/frames.html 2009-12-26 22:06:14 +0000
1536@@ -0,0 +1,17 @@
1537+<?xml version="1.0" encoding="iso-8859-1"?>
1538+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
1539+ "DTD/xhtml1-frameset.dtd">
1540+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
1541+<head>
1542+ <title> API Documentation </title>
1543+</head>
1544+<frameset cols="20%,80%">
1545+ <frameset rows="30%,70%">
1546+ <frame src="toc.html" name="moduleListFrame"
1547+ id="moduleListFrame" />
1548+ <frame src="toc-everything.html" name="moduleFrame"
1549+ id="moduleFrame" />
1550+ </frameset>
1551+ <frame src="scriptutil-module.html" name="mainFrame" id="mainFrame" />
1552+</frameset>
1553+</html>
1554
1555=== removed file 'doc/html/frames.html'
1556--- doc/html/frames.html 2009-12-26 20:49:38 +0000
1557+++ doc/html/frames.html 1970-01-01 00:00:00 +0000
1558@@ -1,17 +0,0 @@
1559-<?xml version="1.0" encoding="iso-8859-1"?>
1560-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
1561- "DTD/xhtml1-frameset.dtd">
1562-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
1563-<head>
1564- <title> Module scriptutil </title>
1565-</head>
1566-<frameset cols="20%,80%">
1567- <frameset rows="30%,70%">
1568- <frame src="toc.html" name="moduleListFrame"
1569- id="moduleListFrame" />
1570- <frame src="toc-everything.html" name="moduleFrame"
1571- id="moduleFrame" />
1572- </frameset>
1573- <frame src="scriptutil-module.html" name="mainFrame" id="mainFrame" />
1574-</frameset>
1575-</html>
1576
1577=== added file 'doc/html/help.html'
1578--- doc/html/help.html 1970-01-01 00:00:00 +0000
1579+++ doc/html/help.html 2009-12-26 22:06:14 +0000
1580@@ -0,0 +1,278 @@
1581+<?xml version="1.0" encoding="ascii"?>
1582+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
1583+ "DTD/xhtml1-transitional.dtd">
1584+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
1585+<head>
1586+ <title>Help</title>
1587+ <link rel="stylesheet" href="epydoc.css" type="text/css" />
1588+ <script type="text/javascript" src="epydoc.js"></script>
1589+</head>
1590+
1591+<body bgcolor="white" text="black" link="blue" vlink="#204080"
1592+ alink="#204080">
1593+<!-- ==================== NAVIGATION BAR ==================== -->
1594+<table class="navbar" border="0" width="100%" cellpadding="0"
1595+ bgcolor="#a0c0ff" cellspacing="0">
1596+ <tr valign="middle">
1597+ <!-- Home link -->
1598+ <th>&nbsp;&nbsp;&nbsp;<a
1599+ href="scriptutil-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
1600+
1601+ <!-- Tree link -->
1602+ <th>&nbsp;&nbsp;&nbsp;<a
1603+ href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
1604+
1605+ <!-- Index link -->
1606+ <th>&nbsp;&nbsp;&nbsp;<a
1607+ href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
1608+
1609+ <!-- Help link -->
1610+ <th bgcolor="#70b0f0" class="navbar-select"
1611+ >&nbsp;&nbsp;&nbsp;Help&nbsp;&nbsp;&nbsp;</th>
1612+
1613+ <!-- Project homepage -->
1614+ <th class="navbar" align="right" width="100%">
1615+ <table border="0" cellpadding="0" cellspacing="0">
1616+ <tr><th class="navbar" align="center"
1617+ ><a class="navbar" target="_top" href="https://launchpad.net/py-script">Project Homepage</a></th>
1618+ </tr></table></th>
1619+ </tr>
1620+</table>
1621+<table width="100%" cellpadding="0" cellspacing="0">
1622+ <tr valign="top">
1623+ <td width="100%">&nbsp;</td>
1624+ <td>
1625+ <table cellpadding="0" cellspacing="0">
1626+ <!-- hide/show private -->
1627+ <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
1628+ onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
1629+ <tr><td align="right"><span class="options"
1630+ >[<a href="frames.html" target="_top">frames</a
1631+ >]&nbsp;|&nbsp;<a href="help.html"
1632+ target="_top">no&nbsp;frames</a>]</span></td></tr>
1633+ </table>
1634+ </td>
1635+ </tr>
1636+</table>
1637+
1638+<h1 class="epydoc"> API Documentation </h1>
1639+
1640+<p> This document contains the API (Application Programming Interface)
1641+documentation for this project. Documentation for the Python
1642+objects defined by the project is divided into separate pages for each
1643+package, module, and class. The API documentation also includes two
1644+pages containing information about the project as a whole: a trees
1645+page, and an index page. </p>
1646+
1647+<h2> Object Documentation </h2>
1648+
1649+ <p>Each <strong>Package Documentation</strong> page contains: </p>
1650+ <ul>
1651+ <li> A description of the package. </li>
1652+ <li> A list of the modules and sub-packages contained by the
1653+ package. </li>
1654+ <li> A summary of the classes defined by the package. </li>
1655+ <li> A summary of the functions defined by the package. </li>
1656+ <li> A summary of the variables defined by the package. </li>
1657+ <li> A detailed description of each function defined by the
1658+ package. </li>
1659+ <li> A detailed description of each variable defined by the
1660+ package. </li>
1661+ </ul>
1662+
1663+ <p>Each <strong>Module Documentation</strong> page contains:</p>
1664+ <ul>
1665+ <li> A description of the module. </li>
1666+ <li> A summary of the classes defined by the module. </li>
1667+ <li> A summary of the functions defined by the module. </li>
1668+ <li> A summary of the variables defined by the module. </li>
1669+ <li> A detailed description of each function defined by the
1670+ module. </li>
1671+ <li> A detailed description of each variable defined by the
1672+ module. </li>
1673+ </ul>
1674+
1675+ <p>Each <strong>Class Documentation</strong> page contains: </p>
1676+ <ul>
1677+ <li> A class inheritance diagram. </li>
1678+ <li> A list of known subclasses. </li>
1679+ <li> A description of the class. </li>
1680+ <li> A summary of the methods defined by the class. </li>
1681+ <li> A summary of the instance variables defined by the class. </li>
1682+ <li> A summary of the class (static) variables defined by the
1683+ class. </li>
1684+ <li> A detailed description of each method defined by the
1685+ class. </li>
1686+ <li> A detailed description of each instance variable defined by the
1687+ class. </li>
1688+ <li> A detailed description of each class (static) variable defined
1689+ by the class. </li>
1690+ </ul>
1691+
1692+<h2> Project Documentation </h2>
1693+
1694+ <p> The <strong>Trees</strong> page contains the module and class hierarchies: </p>
1695+ <ul>
1696+ <li> The <em>module hierarchy</em> lists every package and module, with
1697+ modules grouped into packages. At the top level, and within each
1698+ package, modules and sub-packages are listed alphabetically. </li>
1699+ <li> The <em>class hierarchy</em> lists every class, grouped by base
1700+ class. If a class has more than one base class, then it will be
1701+ listed under each base class. At the top level, and under each base
1702+ class, classes are listed alphabetically. </li>
1703+ </ul>
1704+
1705+ <p> The <strong>Index</strong> page contains indices of terms and
1706+ identifiers: </p>
1707+ <ul>
1708+ <li> The <em>term index</em> lists every term indexed by any object's
1709+ documentation. For each term, the index provides links to each
1710+ place where the term is indexed. </li>
1711+ <li> The <em>identifier index</em> lists the (short) name of every package,
1712+ module, class, method, function, variable, and parameter. For each
1713+ identifier, the index provides a short description, and a link to
1714+ its documentation. </li>
1715+ </ul>
1716+
1717+<h2> The Table of Contents </h2>
1718+
1719+<p> The table of contents occupies the two frames on the left side of
1720+the window. The upper-left frame displays the <em>project
1721+contents</em>, and the lower-left frame displays the <em>module
1722+contents</em>: </p>
1723+
1724+<table class="help summary" border="1" cellspacing="0" cellpadding="3">
1725+ <tr style="height: 30%">
1726+ <td align="center" style="font-size: small">
1727+ Project<br />Contents<hr />...</td>
1728+ <td align="center" style="font-size: small" rowspan="2" width="70%">
1729+ API<br />Documentation<br />Frame<br /><br /><br />
1730+ </td>
1731+ </tr>
1732+ <tr>
1733+ <td align="center" style="font-size: small">
1734+ Module<br />Contents<hr />&nbsp;<br />...<br />&nbsp;
1735+ </td>
1736+ </tr>
1737+</table><br />
1738+
1739+<p> The <strong>project contents frame</strong> contains a list of all packages
1740+and modules that are defined by the project. Clicking on an entry
1741+will display its contents in the module contents frame. Clicking on a
1742+special entry, labeled "Everything," will display the contents of
1743+the entire project. </p>
1744+
1745+<p> The <strong>module contents frame</strong> contains a list of every
1746+submodule, class, type, exception, function, and variable defined by a
1747+module or package. Clicking on an entry will display its
1748+documentation in the API documentation frame. Clicking on the name of
1749+the module, at the top of the frame, will display the documentation
1750+for the module itself. </p>
1751+
1752+<p> The "<strong>frames</strong>" and "<strong>no frames</strong>" buttons below the top
1753+navigation bar can be used to control whether the table of contents is
1754+displayed or not. </p>
1755+
1756+<h2> The Navigation Bar </h2>
1757+
1758+<p> A navigation bar is located at the top and bottom of every page.
1759+It indicates what type of page you are currently viewing, and allows
1760+you to go to related pages. The following table describes the labels
1761+on the navigation bar. Note that not some labels (such as
1762+[Parent]) are not displayed on all pages. </p>
1763+
1764+<table class="summary" border="1" cellspacing="0" cellpadding="3" width="100%">
1765+<tr class="summary">
1766+ <th>Label</th>
1767+ <th>Highlighted when...</th>
1768+ <th>Links to...</th>
1769+</tr>
1770+ <tr><td valign="top"><strong>[Parent]</strong></td>
1771+ <td valign="top"><em>(never highlighted)</em></td>
1772+ <td valign="top"> the parent of the current package </td></tr>
1773+ <tr><td valign="top"><strong>[Package]</strong></td>
1774+ <td valign="top">viewing a package</td>
1775+ <td valign="top">the package containing the current object
1776+ </td></tr>
1777+ <tr><td valign="top"><strong>[Module]</strong></td>
1778+ <td valign="top">viewing a module</td>
1779+ <td valign="top">the module containing the current object
1780+ </td></tr>
1781+ <tr><td valign="top"><strong>[Class]</strong></td>
1782+ <td valign="top">viewing a class </td>
1783+ <td valign="top">the class containing the current object</td></tr>
1784+ <tr><td valign="top"><strong>[Trees]</strong></td>
1785+ <td valign="top">viewing the trees page</td>
1786+ <td valign="top"> the trees page </td></tr>
1787+ <tr><td valign="top"><strong>[Index]</strong></td>
1788+ <td valign="top">viewing the index page</td>
1789+ <td valign="top"> the index page </td></tr>
1790+ <tr><td valign="top"><strong>[Help]</strong></td>
1791+ <td valign="top">viewing the help page</td>
1792+ <td valign="top"> the help page </td></tr>
1793+</table>
1794+
1795+<p> The "<strong>show private</strong>" and "<strong>hide private</strong>" buttons below
1796+the top navigation bar can be used to control whether documentation
1797+for private objects is displayed. Private objects are usually defined
1798+as objects whose (short) names begin with a single underscore, but do
1799+not end with an underscore. For example, "<code>_x</code>",
1800+"<code>__pprint</code>", and "<code>epydoc.epytext._tokenize</code>"
1801+are private objects; but "<code>re.sub</code>",
1802+"<code>__init__</code>", and "<code>type_</code>" are not. However,
1803+if a module defines the "<code>__all__</code>" variable, then its
1804+contents are used to decide which objects are private. </p>
1805+
1806+<p> A timestamp below the bottom navigation bar indicates when each
1807+page was last updated. </p>
1808+<!-- ==================== NAVIGATION BAR ==================== -->
1809+<table class="navbar" border="0" width="100%" cellpadding="0"
1810+ bgcolor="#a0c0ff" cellspacing="0">
1811+ <tr valign="middle">
1812+ <!-- Home link -->
1813+ <th>&nbsp;&nbsp;&nbsp;<a
1814+ href="scriptutil-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
1815+
1816+ <!-- Tree link -->
1817+ <th>&nbsp;&nbsp;&nbsp;<a
1818+ href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
1819+
1820+ <!-- Index link -->
1821+ <th>&nbsp;&nbsp;&nbsp;<a
1822+ href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
1823+
1824+ <!-- Help link -->
1825+ <th bgcolor="#70b0f0" class="navbar-select"
1826+ >&nbsp;&nbsp;&nbsp;Help&nbsp;&nbsp;&nbsp;</th>
1827+
1828+ <!-- Project homepage -->
1829+ <th class="navbar" align="right" width="100%">
1830+ <table border="0" cellpadding="0" cellspacing="0">
1831+ <tr><th class="navbar" align="center"
1832+ ><a class="navbar" target="_top" href="https://launchpad.net/py-script">Project Homepage</a></th>
1833+ </tr></table></th>
1834+ </tr>
1835+</table>
1836+<table border="0" cellpadding="0" cellspacing="0" width="100%%">
1837+ <tr>
1838+ <td align="left" class="footer">
1839+ Generated by Epydoc 3.0.1 on Sat Dec 26 23:01:34 2009
1840+ </td>
1841+ <td align="right" class="footer">
1842+ <a target="mainFrame" href="http://epydoc.sourceforge.net"
1843+ >http://epydoc.sourceforge.net</a>
1844+ </td>
1845+ </tr>
1846+</table>
1847+
1848+<script type="text/javascript">
1849+ <!--
1850+ // Private objects are initially displayed (because if
1851+ // javascript is turned off then we want them to be
1852+ // visible); but by default, we want to hide them. So hide
1853+ // them unless we have a cookie that says to show them.
1854+ checkCookie();
1855+ // -->
1856+</script>
1857+</body>
1858+</html>
1859
1860=== removed file 'doc/html/help.html'
1861--- doc/html/help.html 2009-12-26 20:49:38 +0000
1862+++ doc/html/help.html 1970-01-01 00:00:00 +0000
1863@@ -1,278 +0,0 @@
1864-<?xml version="1.0" encoding="ascii"?>
1865-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
1866- "DTD/xhtml1-transitional.dtd">
1867-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
1868-<head>
1869- <title>Help</title>
1870- <link rel="stylesheet" href="epydoc.css" type="text/css" />
1871- <script type="text/javascript" src="epydoc.js"></script>
1872-</head>
1873-
1874-<body bgcolor="white" text="black" link="blue" vlink="#204080"
1875- alink="#204080">
1876-<!-- ==================== NAVIGATION BAR ==================== -->
1877-<table class="navbar" border="0" width="100%" cellpadding="0"
1878- bgcolor="#a0c0ff" cellspacing="0">
1879- <tr valign="middle">
1880- <!-- Home link -->
1881- <th>&nbsp;&nbsp;&nbsp;<a
1882- href="scriptutil-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
1883-
1884- <!-- Tree link -->
1885- <th>&nbsp;&nbsp;&nbsp;<a
1886- href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
1887-
1888- <!-- Index link -->
1889- <th>&nbsp;&nbsp;&nbsp;<a
1890- href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
1891-
1892- <!-- Help link -->
1893- <th bgcolor="#70b0f0" class="navbar-select"
1894- >&nbsp;&nbsp;&nbsp;Help&nbsp;&nbsp;&nbsp;</th>
1895-
1896- <!-- Project homepage -->
1897- <th class="navbar" align="right" width="100%">
1898- <table border="0" cellpadding="0" cellspacing="0">
1899- <tr><th class="navbar" align="center"
1900- ><a class="navbar" target="_top" href="http://hrnjad.net/src/scriptutil">Module scriptutil</a></th>
1901- </tr></table></th>
1902- </tr>
1903-</table>
1904-<table width="100%" cellpadding="0" cellspacing="0">
1905- <tr valign="top">
1906- <td width="100%">&nbsp;</td>
1907- <td>
1908- <table cellpadding="0" cellspacing="0">
1909- <!-- hide/show private -->
1910- <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
1911- onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
1912- <tr><td align="right"><span class="options"
1913- >[<a href="frames.html" target="_top">frames</a
1914- >]&nbsp;|&nbsp;<a href="help.html"
1915- target="_top">no&nbsp;frames</a>]</span></td></tr>
1916- </table>
1917- </td>
1918- </tr>
1919-</table>
1920-
1921-<h1 class="epydoc"> API Documentation </h1>
1922-
1923-<p> This document contains the API (Application Programming Interface)
1924-documentation for Module scriptutil. Documentation for the Python
1925-objects defined by the project is divided into separate pages for each
1926-package, module, and class. The API documentation also includes two
1927-pages containing information about the project as a whole: a trees
1928-page, and an index page. </p>
1929-
1930-<h2> Object Documentation </h2>
1931-
1932- <p>Each <strong>Package Documentation</strong> page contains: </p>
1933- <ul>
1934- <li> A description of the package. </li>
1935- <li> A list of the modules and sub-packages contained by the
1936- package. </li>
1937- <li> A summary of the classes defined by the package. </li>
1938- <li> A summary of the functions defined by the package. </li>
1939- <li> A summary of the variables defined by the package. </li>
1940- <li> A detailed description of each function defined by the
1941- package. </li>
1942- <li> A detailed description of each variable defined by the
1943- package. </li>
1944- </ul>
1945-
1946- <p>Each <strong>Module Documentation</strong> page contains:</p>
1947- <ul>
1948- <li> A description of the module. </li>
1949- <li> A summary of the classes defined by the module. </li>
1950- <li> A summary of the functions defined by the module. </li>
1951- <li> A summary of the variables defined by the module. </li>
1952- <li> A detailed description of each function defined by the
1953- module. </li>
1954- <li> A detailed description of each variable defined by the
1955- module. </li>
1956- </ul>
1957-
1958- <p>Each <strong>Class Documentation</strong> page contains: </p>
1959- <ul>
1960- <li> A class inheritance diagram. </li>
1961- <li> A list of known subclasses. </li>
1962- <li> A description of the class. </li>
1963- <li> A summary of the methods defined by the class. </li>
1964- <li> A summary of the instance variables defined by the class. </li>
1965- <li> A summary of the class (static) variables defined by the
1966- class. </li>
1967- <li> A detailed description of each method defined by the
1968- class. </li>
1969- <li> A detailed description of each instance variable defined by the
1970- class. </li>
1971- <li> A detailed description of each class (static) variable defined
1972- by the class. </li>
1973- </ul>
1974-
1975-<h2> Project Documentation </h2>
1976-
1977- <p> The <strong>Trees</strong> page contains the module and class hierarchies: </p>
1978- <ul>
1979- <li> The <em>module hierarchy</em> lists every package and module, with
1980- modules grouped into packages. At the top level, and within each
1981- package, modules and sub-packages are listed alphabetically. </li>
1982- <li> The <em>class hierarchy</em> lists every class, grouped by base
1983- class. If a class has more than one base class, then it will be
1984- listed under each base class. At the top level, and under each base
1985- class, classes are listed alphabetically. </li>
1986- </ul>
1987-
1988- <p> The <strong>Index</strong> page contains indices of terms and
1989- identifiers: </p>
1990- <ul>
1991- <li> The <em>term index</em> lists every term indexed by any object's
1992- documentation. For each term, the index provides links to each
1993- place where the term is indexed. </li>
1994- <li> The <em>identifier index</em> lists the (short) name of every package,
1995- module, class, method, function, variable, and parameter. For each
1996- identifier, the index provides a short description, and a link to
1997- its documentation. </li>
1998- </ul>
1999-
2000-<h2> The Table of Contents </h2>
2001-
2002-<p> The table of contents occupies the two frames on the left side of
2003-the window. The upper-left frame displays the <em>project
2004-contents</em>, and the lower-left frame displays the <em>module
2005-contents</em>: </p>
2006-
2007-<table class="help summary" border="1" cellspacing="0" cellpadding="3">
2008- <tr style="height: 30%">
2009- <td align="center" style="font-size: small">
2010- Project<br />Contents<hr />...</td>
2011- <td align="center" style="font-size: small" rowspan="2" width="70%">
2012- API<br />Documentation<br />Frame<br /><br /><br />
2013- </td>
2014- </tr>
2015- <tr>
2016- <td align="center" style="font-size: small">
2017- Module<br />Contents<hr />&nbsp;<br />...<br />&nbsp;
2018- </td>
2019- </tr>
2020-</table><br />
2021-
2022-<p> The <strong>project contents frame</strong> contains a list of all packages
2023-and modules that are defined by the project. Clicking on an entry
2024-will display its contents in the module contents frame. Clicking on a
2025-special entry, labeled "Everything," will display the contents of
2026-the entire project. </p>
2027-
2028-<p> The <strong>module contents frame</strong> contains a list of every
2029-submodule, class, type, exception, function, and variable defined by a
2030-module or package. Clicking on an entry will display its
2031-documentation in the API documentation frame. Clicking on the name of
2032-the module, at the top of the frame, will display the documentation
2033-for the module itself. </p>
2034-
2035-<p> The "<strong>frames</strong>" and "<strong>no frames</strong>" buttons below the top
2036-navigation bar can be used to control whether the table of contents is
2037-displayed or not. </p>
2038-
2039-<h2> The Navigation Bar </h2>
2040-
2041-<p> A navigation bar is located at the top and bottom of every page.
2042-It indicates what type of page you are currently viewing, and allows
2043-you to go to related pages. The following table describes the labels
2044-on the navigation bar. Note that not some labels (such as
2045-[Parent]) are not displayed on all pages. </p>
2046-
2047-<table class="summary" border="1" cellspacing="0" cellpadding="3" width="100%">
2048-<tr class="summary">
2049- <th>Label</th>
2050- <th>Highlighted when...</th>
2051- <th>Links to...</th>
2052-</tr>
2053- <tr><td valign="top"><strong>[Parent]</strong></td>
2054- <td valign="top"><em>(never highlighted)</em></td>
2055- <td valign="top"> the parent of the current package </td></tr>
2056- <tr><td valign="top"><strong>[Package]</strong></td>
2057- <td valign="top">viewing a package</td>
2058- <td valign="top">the package containing the current object
2059- </td></tr>
2060- <tr><td valign="top"><strong>[Module]</strong></td>
2061- <td valign="top">viewing a module</td>
2062- <td valign="top">the module containing the current object
2063- </td></tr>
2064- <tr><td valign="top"><strong>[Class]</strong></td>
2065- <td valign="top">viewing a class </td>
2066- <td valign="top">the class containing the current object</td></tr>
2067- <tr><td valign="top"><strong>[Trees]</strong></td>
2068- <td valign="top">viewing the trees page</td>
2069- <td valign="top"> the trees page </td></tr>
2070- <tr><td valign="top"><strong>[Index]</strong></td>
2071- <td valign="top">viewing the index page</td>
2072- <td valign="top"> the index page </td></tr>
2073- <tr><td valign="top"><strong>[Help]</strong></td>
2074- <td valign="top">viewing the help page</td>
2075- <td valign="top"> the help page </td></tr>
2076-</table>
2077-
2078-<p> The "<strong>show private</strong>" and "<strong>hide private</strong>" buttons below
2079-the top navigation bar can be used to control whether documentation
2080-for private objects is displayed. Private objects are usually defined
2081-as objects whose (short) names begin with a single underscore, but do
2082-not end with an underscore. For example, "<code>_x</code>",
2083-"<code>__pprint</code>", and "<code>epydoc.epytext._tokenize</code>"
2084-are private objects; but "<code>re.sub</code>",
2085-"<code>__init__</code>", and "<code>type_</code>" are not. However,
2086-if a module defines the "<code>__all__</code>" variable, then its
2087-contents are used to decide which objects are private. </p>
2088-
2089-<p> A timestamp below the bottom navigation bar indicates when each
2090-page was last updated. </p>
2091-<!-- ==================== NAVIGATION BAR ==================== -->
2092-<table class="navbar" border="0" width="100%" cellpadding="0"
2093- bgcolor="#a0c0ff" cellspacing="0">
2094- <tr valign="middle">
2095- <!-- Home link -->
2096- <th>&nbsp;&nbsp;&nbsp;<a
2097- href="scriptutil-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
2098-
2099- <!-- Tree link -->
2100- <th>&nbsp;&nbsp;&nbsp;<a
2101- href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
2102-
2103- <!-- Index link -->
2104- <th>&nbsp;&nbsp;&nbsp;<a
2105- href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
2106-
2107- <!-- Help link -->
2108- <th bgcolor="#70b0f0" class="navbar-select"
2109- >&nbsp;&nbsp;&nbsp;Help&nbsp;&nbsp;&nbsp;</th>
2110-
2111- <!-- Project homepage -->
2112- <th class="navbar" align="right" width="100%">
2113- <table border="0" cellpadding="0" cellspacing="0">
2114- <tr><th class="navbar" align="center"
2115- ><a class="navbar" target="_top" href="http://hrnjad.net/src/scriptutil">Module scriptutil</a></th>
2116- </tr></table></th>
2117- </tr>
2118-</table>
2119-<table border="0" cellpadding="0" cellspacing="0" width="100%%">
2120- <tr>
2121- <td align="left" class="footer">
2122- Generated by Epydoc 3.0beta1 on Thu May 22 18:10:51 2008
2123- </td>
2124- <td align="right" class="footer">
2125- <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
2126- </td>
2127- </tr>
2128-</table>
2129-
2130-<script type="text/javascript">
2131- <!--
2132- // Private objects are initially displayed (because if
2133- // javascript is turned off then we want them to be
2134- // visible); but by default, we want to hide them. So hide
2135- // them unless we have a cookie that says to show them.
2136- checkCookie()
2137- // -->
2138-</script>
2139-
2140-</body>
2141-</html>
2142
2143=== added file 'doc/html/identifier-index.html'
2144--- doc/html/identifier-index.html 1970-01-01 00:00:00 +0000
2145+++ doc/html/identifier-index.html 2009-12-26 22:06:14 +0000
2146@@ -0,0 +1,217 @@
2147+<?xml version="1.0" encoding="ascii"?>
2148+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2149+ "DTD/xhtml1-transitional.dtd">
2150+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
2151+<head>
2152+ <title>Identifier Index</title>
2153+ <link rel="stylesheet" href="epydoc.css" type="text/css" />
2154+ <script type="text/javascript" src="epydoc.js"></script>
2155+</head>
2156+
2157+<body bgcolor="white" text="black" link="blue" vlink="#204080"
2158+ alink="#204080">
2159+<!-- ==================== NAVIGATION BAR ==================== -->
2160+<table class="navbar" border="0" width="100%" cellpadding="0"
2161+ bgcolor="#a0c0ff" cellspacing="0">
2162+ <tr valign="middle">
2163+ <!-- Home link -->
2164+ <th>&nbsp;&nbsp;&nbsp;<a
2165+ href="scriptutil-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
2166+
2167+ <!-- Tree link -->
2168+ <th>&nbsp;&nbsp;&nbsp;<a
2169+ href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
2170+
2171+ <!-- Index link -->
2172+ <th bgcolor="#70b0f0" class="navbar-select"
2173+ >&nbsp;&nbsp;&nbsp;Indices&nbsp;&nbsp;&nbsp;</th>
2174+
2175+ <!-- Help link -->
2176+ <th>&nbsp;&nbsp;&nbsp;<a
2177+ href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
2178+
2179+ <!-- Project homepage -->
2180+ <th class="navbar" align="right" width="100%">
2181+ <table border="0" cellpadding="0" cellspacing="0">
2182+ <tr><th class="navbar" align="center"
2183+ ><a class="navbar" target="_top" href="https://launchpad.net/py-script">Project Homepage</a></th>
2184+ </tr></table></th>
2185+ </tr>
2186+</table>
2187+<table width="100%" cellpadding="0" cellspacing="0">
2188+ <tr valign="top">
2189+ <td width="100%">&nbsp;</td>
2190+ <td>
2191+ <table cellpadding="0" cellspacing="0">
2192+ <!-- hide/show private -->
2193+ <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
2194+ onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
2195+ <tr><td align="right"><span class="options"
2196+ >[<a href="frames.html" target="_top">frames</a
2197+ >]&nbsp;|&nbsp;<a href="identifier-index.html"
2198+ target="_top">no&nbsp;frames</a>]</span></td></tr>
2199+ </table>
2200+ </td>
2201+ </tr>
2202+</table>
2203+<table border="0" width="100%">
2204+<tr valign="bottom"><td>
2205+<h1 class="epydoc">Identifier Index</h1>
2206+</td><td>
2207+[
2208+ A
2209+ B
2210+ C
2211+ D
2212+ E
2213+ <a href="#F">F</a>
2214+ <a href="#G">G</a>
2215+ H
2216+ I
2217+ J
2218+ K
2219+ L
2220+ M
2221+ N
2222+ O
2223+ <a href="#P">P</a>
2224+ Q
2225+ <a href="#R">R</a>
2226+ <a href="#S">S</a>
2227+ T
2228+ U
2229+ V
2230+ W
2231+ X
2232+ Y
2233+ Z
2234+ <a href="#_">_</a>
2235+]
2236+</td></table>
2237+<table border="0" width="100%">
2238+<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="F">F</a></h2></td>
2239+<td valign="top">
2240+<table class="link-index" width="100%" border="1">
2241+<tr>
2242+<td width="33%" class="link-index"><a href="scriptutil.find-module.html">find</a><br />
2243+<span class="index-where">(in&nbsp;<a href="scriptutil-module.html">scriptutil</a>)</span></td>
2244+<td width="33%" class="link-index"><a href="scriptutil.find-module.html#find">find()</a><br />
2245+<span class="index-where">(in&nbsp;<a href="scriptutil.find-module.html">scriptutil.find</a>)</span></td>
2246+<td width="33%" class="link-index">&nbsp;</td>
2247+</tr>
2248+<tr><td class="link-index">&nbsp;</td><td class="link-index">&nbsp;</td><td class="link-index">&nbsp;</td></tr>
2249+</table>
2250+</td></tr>
2251+<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="G">G</a></h2></td>
2252+<td valign="top">
2253+<table class="link-index" width="100%" border="1">
2254+<tr>
2255+<td width="33%" class="link-index"><a href="scriptutil.find-module.html#grep">grep()</a><br />
2256+<span class="index-where">(in&nbsp;<a href="scriptutil.find-module.html">scriptutil.find</a>)</span></td>
2257+<td width="33%" class="link-index">&nbsp;</td>
2258+<td width="33%" class="link-index">&nbsp;</td>
2259+</tr>
2260+<tr><td class="link-index">&nbsp;</td><td class="link-index">&nbsp;</td><td class="link-index">&nbsp;</td></tr>
2261+</table>
2262+</td></tr>
2263+<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="P">P</a></h2></td>
2264+<td valign="top">
2265+<table class="link-index" width="100%" border="1">
2266+<tr>
2267+<td width="33%" class="link-index"><a href="scriptutil.find-module.html#pprint">pprint()</a><br />
2268+<span class="index-where">(in&nbsp;<a href="scriptutil.find-module.html">scriptutil.find</a>)</span></td>
2269+<td width="33%" class="link-index">&nbsp;</td>
2270+<td width="33%" class="link-index">&nbsp;</td>
2271+</tr>
2272+<tr><td class="link-index">&nbsp;</td><td class="link-index">&nbsp;</td><td class="link-index">&nbsp;</td></tr>
2273+</table>
2274+</td></tr>
2275+<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="R">R</a></h2></td>
2276+<td valign="top">
2277+<table class="link-index" width="100%" border="1">
2278+<tr>
2279+<td width="33%" class="link-index"><a href="scriptutil.find-module.html#replace">replace()</a><br />
2280+<span class="index-where">(in&nbsp;<a href="scriptutil.find-module.html">scriptutil.find</a>)</span></td>
2281+<td width="33%" class="link-index">&nbsp;</td>
2282+<td width="33%" class="link-index">&nbsp;</td>
2283+</tr>
2284+<tr><td class="link-index">&nbsp;</td><td class="link-index">&nbsp;</td><td class="link-index">&nbsp;</td></tr>
2285+</table>
2286+</td></tr>
2287+<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="S">S</a></h2></td>
2288+<td valign="top">
2289+<table class="link-index" width="100%" border="1">
2290+<tr>
2291+<td width="33%" class="link-index"><a href="scriptutil.find.ScriptError-class.html">ScriptError</a><br />
2292+<span class="index-where">(in&nbsp;<a href="scriptutil.find-module.html">scriptutil.find</a>)</span></td>
2293+<td width="33%" class="link-index"><a href="scriptutil-module.html">scriptutil</a></td>
2294+<td width="33%" class="link-index">&nbsp;</td>
2295+</tr>
2296+<tr><td class="link-index">&nbsp;</td><td class="link-index">&nbsp;</td><td class="link-index">&nbsp;</td></tr>
2297+</table>
2298+</td></tr>
2299+<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="_">_</a></h2></td>
2300+<td valign="top">
2301+<table class="link-index" width="100%" border="1">
2302+<tr>
2303+<td width="33%" class="link-index"><a href="scriptutil-module.html#__package__">__package__</a><br />
2304+<span class="index-where">(in&nbsp;<a href="scriptutil-module.html">scriptutil</a>)</span></td>
2305+<td width="33%" class="link-index"><a href="scriptutil.find-module.html#__package__">__package__</a><br />
2306+<span class="index-where">(in&nbsp;<a href="scriptutil.find-module.html">scriptutil.find</a>)</span></td>
2307+<td width="33%" class="link-index">&nbsp;</td>
2308+</tr>
2309+<tr><td class="link-index">&nbsp;</td><td class="link-index">&nbsp;</td><td class="link-index">&nbsp;</td></tr>
2310+</table>
2311+</td></tr>
2312+</table>
2313+<br /><br /><!-- ==================== NAVIGATION BAR ==================== -->
2314+<table class="navbar" border="0" width="100%" cellpadding="0"
2315+ bgcolor="#a0c0ff" cellspacing="0">
2316+ <tr valign="middle">
2317+ <!-- Home link -->
2318+ <th>&nbsp;&nbsp;&nbsp;<a
2319+ href="scriptutil-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
2320+
2321+ <!-- Tree link -->
2322+ <th>&nbsp;&nbsp;&nbsp;<a
2323+ href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
2324+
2325+ <!-- Index link -->
2326+ <th bgcolor="#70b0f0" class="navbar-select"
2327+ >&nbsp;&nbsp;&nbsp;Indices&nbsp;&nbsp;&nbsp;</th>
2328+
2329+ <!-- Help link -->
2330+ <th>&nbsp;&nbsp;&nbsp;<a
2331+ href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
2332+
2333+ <!-- Project homepage -->
2334+ <th class="navbar" align="right" width="100%">
2335+ <table border="0" cellpadding="0" cellspacing="0">
2336+ <tr><th class="navbar" align="center"
2337+ ><a class="navbar" target="_top" href="https://launchpad.net/py-script">Project Homepage</a></th>
2338+ </tr></table></th>
2339+ </tr>
2340+</table>
2341+<table border="0" cellpadding="0" cellspacing="0" width="100%%">
2342+ <tr>
2343+ <td align="left" class="footer">
2344+ Generated by Epydoc 3.0.1 on Sat Dec 26 23:01:34 2009
2345+ </td>
2346+ <td align="right" class="footer">
2347+ <a target="mainFrame" href="http://epydoc.sourceforge.net"
2348+ >http://epydoc.sourceforge.net</a>
2349+ </td>
2350+ </tr>
2351+</table>
2352+
2353+<script type="text/javascript">
2354+ <!--
2355+ // Private objects are initially displayed (because if
2356+ // javascript is turned off then we want them to be
2357+ // visible); but by default, we want to hide them. So hide
2358+ // them unless we have a cookie that says to show them.
2359+ checkCookie();
2360+ // -->
2361+</script>
2362+</body>
2363+</html>
2364
2365=== removed file 'doc/html/identifier-index.html'
2366--- doc/html/identifier-index.html 2009-12-26 20:49:38 +0000
2367+++ doc/html/identifier-index.html 1970-01-01 00:00:00 +0000
2368@@ -1,181 +0,0 @@
2369-<?xml version="1.0" encoding="ascii"?>
2370-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2371- "DTD/xhtml1-transitional.dtd">
2372-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
2373-<head>
2374- <title>Identifier Index</title>
2375- <link rel="stylesheet" href="epydoc.css" type="text/css" />
2376- <script type="text/javascript" src="epydoc.js"></script>
2377-</head>
2378-
2379-<body bgcolor="white" text="black" link="blue" vlink="#204080"
2380- alink="#204080">
2381-<!-- ==================== NAVIGATION BAR ==================== -->
2382-<table class="navbar" border="0" width="100%" cellpadding="0"
2383- bgcolor="#a0c0ff" cellspacing="0">
2384- <tr valign="middle">
2385- <!-- Home link -->
2386- <th>&nbsp;&nbsp;&nbsp;<a
2387- href="scriptutil-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
2388-
2389- <!-- Tree link -->
2390- <th>&nbsp;&nbsp;&nbsp;<a
2391- href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
2392-
2393- <!-- Index link -->
2394- <th bgcolor="#70b0f0" class="navbar-select"
2395- >&nbsp;&nbsp;&nbsp;Indices&nbsp;&nbsp;&nbsp;</th>
2396-
2397- <!-- Help link -->
2398- <th>&nbsp;&nbsp;&nbsp;<a
2399- href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
2400-
2401- <!-- Project homepage -->
2402- <th class="navbar" align="right" width="100%">
2403- <table border="0" cellpadding="0" cellspacing="0">
2404- <tr><th class="navbar" align="center"
2405- ><a class="navbar" target="_top" href="http://hrnjad.net/src/scriptutil">Module scriptutil</a></th>
2406- </tr></table></th>
2407- </tr>
2408-</table>
2409-<table width="100%" cellpadding="0" cellspacing="0">
2410- <tr valign="top">
2411- <td width="100%">&nbsp;</td>
2412- <td>
2413- <table cellpadding="0" cellspacing="0">
2414- <!-- hide/show private -->
2415- <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
2416- onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
2417- <tr><td align="right"><span class="options"
2418- >[<a href="frames.html" target="_top">frames</a
2419- >]&nbsp;|&nbsp;<a href="identifier-index.html"
2420- target="_top">no&nbsp;frames</a>]</span></td></tr>
2421- </table>
2422- </td>
2423- </tr>
2424-</table>
2425-<table border="0" width="100%">
2426-<tr valign="bottom"><td>
2427-<h1 class="epydoc">Identifier Index</h1>
2428-</td><td>
2429-[
2430- A
2431- B
2432- C
2433- D
2434- E
2435- <a href="#F">F</a>
2436- G
2437- H
2438- I
2439- J
2440- K
2441- L
2442- M
2443- N
2444- O
2445- <a href="#P">P</a>
2446- Q
2447- R
2448- <a href="#S">S</a>
2449- T
2450- U
2451- V
2452- W
2453- X
2454- Y
2455- Z
2456- _
2457-]
2458-</td></table>
2459-<table border="0" width="100%"><tr valign="top">
2460-<td valign="top" width="1%"><a name="F"><h2 class="epydoc">F</h2></a></td>
2461-<td valign="top">
2462-<table class="link-index" width="100%" border="1">
2463-<tr>
2464-<td width="33%" class="link-index"><a href="scriptutil-module.html#ffind">ffind()</a><br />
2465-<span class="index-where">(in&nbsp;<a href="scriptutil-module.html">scriptutil</a>)</font></td>
2466-<td width="33%" class="link-index"><a href="scriptutil-module.html#ffindgrep">ffindgrep()</a><br />
2467-<span class="index-where">(in&nbsp;<a href="scriptutil-module.html">scriptutil</a>)</font></td>
2468-<td width="33%" class="link-index"><a href="scriptutil-module.html#freplace">freplace()</a><br />
2469-<span class="index-where">(in&nbsp;<a href="scriptutil-module.html">scriptutil</a>)</font></td>
2470-</tr>
2471-<tr><td class="link-index">&nbsp;</td><td class="link-index">&nbsp;</td><td class="link-index">&nbsp;</td></tr>
2472-</table>
2473-</td></tr>
2474-<td valign="top" width="1%"><a name="P"><h2 class="epydoc">P</h2></a></td>
2475-<td valign="top">
2476-<table class="link-index" width="100%" border="1">
2477-<tr>
2478-<td width="33%" class="link-index"><a href="scriptutil-module.html#printr">printr()</a><br />
2479-<span class="index-where">(in&nbsp;<a href="scriptutil-module.html">scriptutil</a>)</font></td>
2480-<td width="33%" class="link-index">&nbsp;</td>
2481-<td width="33%" class="link-index">&nbsp;</td>
2482-</tr>
2483-<tr><td class="link-index">&nbsp;</td><td class="link-index">&nbsp;</td><td class="link-index">&nbsp;</td></tr>
2484-</table>
2485-</td></tr>
2486-<td valign="top" width="1%"><a name="S"><h2 class="epydoc">S</h2></a></td>
2487-<td valign="top">
2488-<table class="link-index" width="100%" border="1">
2489-<tr>
2490-<td width="33%" class="link-index"><a href="scriptutil.ScriptError-class.html">ScriptError</a><br />
2491-<span class="index-where">(in&nbsp;<a href="scriptutil-module.html">scriptutil</a>)</font></td>
2492-<td width="33%" class="link-index"><a href="scriptutil-module.html">scriptutil</a></td>
2493-<td width="33%" class="link-index">&nbsp;</td>
2494-</tr>
2495-<tr><td class="link-index">&nbsp;</td><td class="link-index">&nbsp;</td><td class="link-index">&nbsp;</td></tr>
2496-</table>
2497-</td></tr>
2498-</table>
2499-</br /><br /><!-- ==================== NAVIGATION BAR ==================== -->
2500-<table class="navbar" border="0" width="100%" cellpadding="0"
2501- bgcolor="#a0c0ff" cellspacing="0">
2502- <tr valign="middle">
2503- <!-- Home link -->
2504- <th>&nbsp;&nbsp;&nbsp;<a
2505- href="scriptutil-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
2506-
2507- <!-- Tree link -->
2508- <th>&nbsp;&nbsp;&nbsp;<a
2509- href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
2510-
2511- <!-- Index link -->
2512- <th bgcolor="#70b0f0" class="navbar-select"
2513- >&nbsp;&nbsp;&nbsp;Indices&nbsp;&nbsp;&nbsp;</th>
2514-
2515- <!-- Help link -->
2516- <th>&nbsp;&nbsp;&nbsp;<a
2517- href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
2518-
2519- <!-- Project homepage -->
2520- <th class="navbar" align="right" width="100%">
2521- <table border="0" cellpadding="0" cellspacing="0">
2522- <tr><th class="navbar" align="center"
2523- ><a class="navbar" target="_top" href="http://hrnjad.net/src/scriptutil">Module scriptutil</a></th>
2524- </tr></table></th>
2525- </tr>
2526-</table>
2527-<table border="0" cellpadding="0" cellspacing="0" width="100%%">
2528- <tr>
2529- <td align="left" class="footer">
2530- Generated by Epydoc 3.0beta1 on Thu May 22 18:10:51 2008
2531- </td>
2532- <td align="right" class="footer">
2533- <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
2534- </td>
2535- </tr>
2536-</table>
2537-
2538-<script type="text/javascript">
2539- <!--
2540- // Private objects are initially displayed (because if
2541- // javascript is turned off then we want them to be
2542- // visible); but by default, we want to hide them. So hide
2543- // them unless we have a cookie that says to show them.
2544- checkCookie()
2545- // -->
2546-</script>
2547-
2548-</body>
2549-</html>
2550
2551=== added file 'doc/html/index.html'
2552--- doc/html/index.html 1970-01-01 00:00:00 +0000
2553+++ doc/html/index.html 2009-12-26 22:06:14 +0000
2554@@ -0,0 +1,17 @@
2555+<?xml version="1.0" encoding="iso-8859-1"?>
2556+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
2557+ "DTD/xhtml1-frameset.dtd">
2558+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
2559+<head>
2560+ <title> API Documentation </title>
2561+</head>
2562+<frameset cols="20%,80%">
2563+ <frameset rows="30%,70%">
2564+ <frame src="toc.html" name="moduleListFrame"
2565+ id="moduleListFrame" />
2566+ <frame src="toc-everything.html" name="moduleFrame"
2567+ id="moduleFrame" />
2568+ </frameset>
2569+ <frame src="scriptutil-module.html" name="mainFrame" id="mainFrame" />
2570+</frameset>
2571+</html>
2572
2573=== removed file 'doc/html/index.html'
2574--- doc/html/index.html 2009-12-26 20:49:38 +0000
2575+++ doc/html/index.html 1970-01-01 00:00:00 +0000
2576@@ -1,17 +0,0 @@
2577-<?xml version="1.0" encoding="iso-8859-1"?>
2578-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
2579- "DTD/xhtml1-frameset.dtd">
2580-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
2581-<head>
2582- <title> Module scriptutil </title>
2583-</head>
2584-<frameset cols="20%,80%">
2585- <frameset rows="30%,70%">
2586- <frame src="toc.html" name="moduleListFrame"
2587- id="moduleListFrame" />
2588- <frame src="toc-everything.html" name="moduleFrame"
2589- id="moduleFrame" />
2590- </frameset>
2591- <frame src="scriptutil-module.html" name="mainFrame" id="mainFrame" />
2592-</frameset>
2593-</html>
2594
2595=== added file 'doc/html/module-tree.html'
2596--- doc/html/module-tree.html 1970-01-01 00:00:00 +0000
2597+++ doc/html/module-tree.html 2009-12-26 22:06:14 +0000
2598@@ -0,0 +1,119 @@
2599+<?xml version="1.0" encoding="ascii"?>
2600+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2601+ "DTD/xhtml1-transitional.dtd">
2602+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
2603+<head>
2604+ <title>Module Hierarchy</title>
2605+ <link rel="stylesheet" href="epydoc.css" type="text/css" />
2606+ <script type="text/javascript" src="epydoc.js"></script>
2607+</head>
2608+
2609+<body bgcolor="white" text="black" link="blue" vlink="#204080"
2610+ alink="#204080">
2611+<!-- ==================== NAVIGATION BAR ==================== -->
2612+<table class="navbar" border="0" width="100%" cellpadding="0"
2613+ bgcolor="#a0c0ff" cellspacing="0">
2614+ <tr valign="middle">
2615+ <!-- Home link -->
2616+ <th>&nbsp;&nbsp;&nbsp;<a
2617+ href="scriptutil-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
2618+
2619+ <!-- Tree link -->
2620+ <th bgcolor="#70b0f0" class="navbar-select"
2621+ >&nbsp;&nbsp;&nbsp;Trees&nbsp;&nbsp;&nbsp;</th>
2622+
2623+ <!-- Index link -->
2624+ <th>&nbsp;&nbsp;&nbsp;<a
2625+ href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
2626+
2627+ <!-- Help link -->
2628+ <th>&nbsp;&nbsp;&nbsp;<a
2629+ href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
2630+
2631+ <!-- Project homepage -->
2632+ <th class="navbar" align="right" width="100%">
2633+ <table border="0" cellpadding="0" cellspacing="0">
2634+ <tr><th class="navbar" align="center"
2635+ ><a class="navbar" target="_top" href="https://launchpad.net/py-script">Project Homepage</a></th>
2636+ </tr></table></th>
2637+ </tr>
2638+</table>
2639+<table width="100%" cellpadding="0" cellspacing="0">
2640+ <tr valign="top">
2641+ <td width="100%">&nbsp;</td>
2642+ <td>
2643+ <table cellpadding="0" cellspacing="0">
2644+ <!-- hide/show private -->
2645+ <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
2646+ onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
2647+ <tr><td align="right"><span class="options"
2648+ >[<a href="frames.html" target="_top">frames</a
2649+ >]&nbsp;|&nbsp;<a href="module-tree.html"
2650+ target="_top">no&nbsp;frames</a>]</span></td></tr>
2651+ </table>
2652+ </td>
2653+ </tr>
2654+</table>
2655+<center><b>
2656+ [ <a href="module-tree.html">Module Hierarchy</a>
2657+ | <a href="class-tree.html">Class Hierarchy</a> ]
2658+</b></center><br />
2659+<h1 class="epydoc">Module Hierarchy</h1>
2660+<ul class="nomargin-top">
2661+ <li> <strong class="uidlink"><a href="scriptutil-module.html">scriptutil</a></strong>
2662+ <ul>
2663+ <li> <strong class="uidlink"><a href="scriptutil.find-module.html">scriptutil.find</a></strong>: <em class="summary">Functions commonly used in shell scripting:</em> </li>
2664+ </ul>
2665+ </li>
2666+</ul>
2667+<!-- ==================== NAVIGATION BAR ==================== -->
2668+<table class="navbar" border="0" width="100%" cellpadding="0"
2669+ bgcolor="#a0c0ff" cellspacing="0">
2670+ <tr valign="middle">
2671+ <!-- Home link -->
2672+ <th>&nbsp;&nbsp;&nbsp;<a
2673+ href="scriptutil-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
2674+
2675+ <!-- Tree link -->
2676+ <th bgcolor="#70b0f0" class="navbar-select"
2677+ >&nbsp;&nbsp;&nbsp;Trees&nbsp;&nbsp;&nbsp;</th>
2678+
2679+ <!-- Index link -->
2680+ <th>&nbsp;&nbsp;&nbsp;<a
2681+ href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
2682+
2683+ <!-- Help link -->
2684+ <th>&nbsp;&nbsp;&nbsp;<a
2685+ href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
2686+
2687+ <!-- Project homepage -->
2688+ <th class="navbar" align="right" width="100%">
2689+ <table border="0" cellpadding="0" cellspacing="0">
2690+ <tr><th class="navbar" align="center"
2691+ ><a class="navbar" target="_top" href="https://launchpad.net/py-script">Project Homepage</a></th>
2692+ </tr></table></th>
2693+ </tr>
2694+</table>
2695+<table border="0" cellpadding="0" cellspacing="0" width="100%%">
2696+ <tr>
2697+ <td align="left" class="footer">
2698+ Generated by Epydoc 3.0.1 on Sat Dec 26 23:01:34 2009
2699+ </td>
2700+ <td align="right" class="footer">
2701+ <a target="mainFrame" href="http://epydoc.sourceforge.net"
2702+ >http://epydoc.sourceforge.net</a>
2703+ </td>
2704+ </tr>
2705+</table>
2706+
2707+<script type="text/javascript">
2708+ <!--
2709+ // Private objects are initially displayed (because if
2710+ // javascript is turned off then we want them to be
2711+ // visible); but by default, we want to hide them. So hide
2712+ // them unless we have a cookie that says to show them.
2713+ checkCookie();
2714+ // -->
2715+</script>
2716+</body>
2717+</html>
2718
2719=== removed file 'doc/html/module-tree.html'
2720--- doc/html/module-tree.html 2009-12-26 20:49:38 +0000
2721+++ doc/html/module-tree.html 1970-01-01 00:00:00 +0000
2722@@ -1,115 +0,0 @@
2723-<?xml version="1.0" encoding="ascii"?>
2724-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2725- "DTD/xhtml1-transitional.dtd">
2726-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
2727-<head>
2728- <title>Module Hierarchy</title>
2729- <link rel="stylesheet" href="epydoc.css" type="text/css" />
2730- <script type="text/javascript" src="epydoc.js"></script>
2731-</head>
2732-
2733-<body bgcolor="white" text="black" link="blue" vlink="#204080"
2734- alink="#204080">
2735-<!-- ==================== NAVIGATION BAR ==================== -->
2736-<table class="navbar" border="0" width="100%" cellpadding="0"
2737- bgcolor="#a0c0ff" cellspacing="0">
2738- <tr valign="middle">
2739- <!-- Home link -->
2740- <th>&nbsp;&nbsp;&nbsp;<a
2741- href="scriptutil-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
2742-
2743- <!-- Tree link -->
2744- <th bgcolor="#70b0f0" class="navbar-select"
2745- >&nbsp;&nbsp;&nbsp;Trees&nbsp;&nbsp;&nbsp;</th>
2746-
2747- <!-- Index link -->
2748- <th>&nbsp;&nbsp;&nbsp;<a
2749- href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
2750-
2751- <!-- Help link -->
2752- <th>&nbsp;&nbsp;&nbsp;<a
2753- href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
2754-
2755- <!-- Project homepage -->
2756- <th class="navbar" align="right" width="100%">
2757- <table border="0" cellpadding="0" cellspacing="0">
2758- <tr><th class="navbar" align="center"
2759- ><a class="navbar" target="_top" href="http://hrnjad.net/src/scriptutil">Module scriptutil</a></th>
2760- </tr></table></th>
2761- </tr>
2762-</table>
2763-<table width="100%" cellpadding="0" cellspacing="0">
2764- <tr valign="top">
2765- <td width="100%">&nbsp;</td>
2766- <td>
2767- <table cellpadding="0" cellspacing="0">
2768- <!-- hide/show private -->
2769- <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
2770- onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
2771- <tr><td align="right"><span class="options"
2772- >[<a href="frames.html" target="_top">frames</a
2773- >]&nbsp;|&nbsp;<a href="module-tree.html"
2774- target="_top">no&nbsp;frames</a>]</span></td></tr>
2775- </table>
2776- </td>
2777- </tr>
2778-</table>
2779-<center><b>
2780- [ <a href="module-tree.html">Module Hierarchy</a>
2781- | <a href="class-tree.html">Class Hierarchy</a> ]
2782-</b></center><br />
2783-<h1 class="epydoc">Module Hierarchy</h1>
2784-<ul class="nomargin-top">
2785- <li> <strong class="uidlink"><a href="scriptutil-module.html">scriptutil</a></strong>: <em class="summary">Copyright (c) 2008, Muharem Hrnjadovic</em> </li>
2786-</ul>
2787-<!-- ==================== NAVIGATION BAR ==================== -->
2788-<table class="navbar" border="0" width="100%" cellpadding="0"
2789- bgcolor="#a0c0ff" cellspacing="0">
2790- <tr valign="middle">
2791- <!-- Home link -->
2792- <th>&nbsp;&nbsp;&nbsp;<a
2793- href="scriptutil-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
2794-
2795- <!-- Tree link -->
2796- <th bgcolor="#70b0f0" class="navbar-select"
2797- >&nbsp;&nbsp;&nbsp;Trees&nbsp;&nbsp;&nbsp;</th>
2798-
2799- <!-- Index link -->
2800- <th>&nbsp;&nbsp;&nbsp;<a
2801- href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
2802-
2803- <!-- Help link -->
2804- <th>&nbsp;&nbsp;&nbsp;<a
2805- href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
2806-
2807- <!-- Project homepage -->
2808- <th class="navbar" align="right" width="100%">
2809- <table border="0" cellpadding="0" cellspacing="0">
2810- <tr><th class="navbar" align="center"
2811- ><a class="navbar" target="_top" href="http://hrnjad.net/src/scriptutil">Module scriptutil</a></th>
2812- </tr></table></th>
2813- </tr>
2814-</table>
2815-<table border="0" cellpadding="0" cellspacing="0" width="100%%">
2816- <tr>
2817- <td align="left" class="footer">
2818- Generated by Epydoc 3.0beta1 on Thu May 22 18:10:51 2008
2819- </td>
2820- <td align="right" class="footer">
2821- <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
2822- </td>
2823- </tr>
2824-</table>
2825-
2826-<script type="text/javascript">
2827- <!--
2828- // Private objects are initially displayed (because if
2829- // javascript is turned off then we want them to be
2830- // visible); but by default, we want to hide them. So hide
2831- // them unless we have a cookie that says to show them.
2832- checkCookie()
2833- // -->
2834-</script>
2835-
2836-</body>
2837-</html>
2838
2839=== added file 'doc/html/redirect.html'
2840--- doc/html/redirect.html 1970-01-01 00:00:00 +0000
2841+++ doc/html/redirect.html 2009-12-26 22:06:14 +0000
2842@@ -0,0 +1,38 @@
2843+<html><head><title>Epydoc Redirect Page</title>
2844+<meta http-equiv="cache-control" content="no-cache" />
2845+<meta http-equiv="expires" content="0" />
2846+<meta http-equiv="pragma" content="no-cache" />
2847+ <script type="text/javascript" src="epydoc.js"></script>
2848+</head>
2849+<body>
2850+<script type="text/javascript">
2851+<!--
2852+var pages = ["scriptutil.find.ScriptError-c", "scriptutil.find-m", "scriptutil-m"];
2853+var dottedName = get_anchor();
2854+if (dottedName) {
2855+ var target = redirect_url(dottedName);
2856+ if (target) window.location.replace(target);
2857+}
2858+// -->
2859+</script>
2860+
2861+<h3>Epydoc Auto-redirect page</h3>
2862+
2863+<p>When javascript is enabled, this page will redirect URLs of
2864+the form <tt>redirect.html#<i>dotted.name</i></tt> to the
2865+documentation for the object with the given fully-qualified
2866+dotted name.</p>
2867+<p><a id="message"> &nbsp; </a></p>
2868+
2869+<script type="text/javascript">
2870+<!--
2871+if (dottedName) {
2872+ var msg = document.getElementById("message");
2873+ msg.innerHTML = "No documentation found for <tt>"+
2874+ dottedName+"</tt>";
2875+}
2876+// -->
2877+</script>
2878+
2879+</body>
2880+</html>
2881
2882=== removed file 'doc/html/redirect.html'
2883--- doc/html/redirect.html 2009-12-26 20:49:38 +0000
2884+++ doc/html/redirect.html 1970-01-01 00:00:00 +0000
2885@@ -1,38 +0,0 @@
2886-<html><head><title>Epydoc Redirect Page</title>
2887-<meta http-equiv="cache-control" content="no-cache" />
2888-<meta http-equiv="expires" content="0" />
2889-<meta http-equiv="pragma" content="no-cache" />
2890- <script type="text/javascript" src="epydoc.js"></script>
2891-</head>
2892-<body>
2893-<script type="text/javascript">
2894-<!--
2895-var pages = ["scriptutil.ScriptError-c", "scriptutil-m"];
2896-var dottedName = get_anchor();
2897-if (dottedName) {
2898- var target = redirect_url(dottedName);
2899- if (target) window.location.replace(target);
2900-}
2901-// -->
2902-</script>
2903-
2904-<h3>Epydoc Auto-redirect page</h3>
2905-
2906-<p>When javascript is enabled, this page will redirect URLs of
2907-the form <tt>redirect.html#<i>dotted.name</i></tt> to the
2908-documentation for the object with the given fully-qualified
2909-dotted name.</p>
2910-<p><a id="message"> &nbsp; </a></p>
2911-
2912-<script type="text/javascript">
2913-<!--
2914-if (dottedName) {
2915- var msg = document.getElementById("message");
2916- msg.innerHTML = "No documentation found for <tt>"+
2917- dottedName+"</tt>";
2918-}
2919-// -->
2920-</script>
2921-
2922-</body>
2923-</html>
2924
2925=== added file 'doc/html/scriptutil-module.html'
2926--- doc/html/scriptutil-module.html 1970-01-01 00:00:00 +0000
2927+++ doc/html/scriptutil-module.html 2009-12-26 22:06:14 +0000
2928@@ -0,0 +1,162 @@
2929+<?xml version="1.0" encoding="ascii"?>
2930+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2931+ "DTD/xhtml1-transitional.dtd">
2932+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
2933+<head>
2934+ <title>scriptutil</title>
2935+ <link rel="stylesheet" href="epydoc.css" type="text/css" />
2936+ <script type="text/javascript" src="epydoc.js"></script>
2937+</head>
2938+
2939+<body bgcolor="white" text="black" link="blue" vlink="#204080"
2940+ alink="#204080">
2941+<!-- ==================== NAVIGATION BAR ==================== -->
2942+<table class="navbar" border="0" width="100%" cellpadding="0"
2943+ bgcolor="#a0c0ff" cellspacing="0">
2944+ <tr valign="middle">
2945+ <!-- Home link -->
2946+ <th bgcolor="#70b0f0" class="navbar-select"
2947+ >&nbsp;&nbsp;&nbsp;Home&nbsp;&nbsp;&nbsp;</th>
2948+
2949+ <!-- Tree link -->
2950+ <th>&nbsp;&nbsp;&nbsp;<a
2951+ href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
2952+
2953+ <!-- Index link -->
2954+ <th>&nbsp;&nbsp;&nbsp;<a
2955+ href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
2956+
2957+ <!-- Help link -->
2958+ <th>&nbsp;&nbsp;&nbsp;<a
2959+ href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
2960+
2961+ <!-- Project homepage -->
2962+ <th class="navbar" align="right" width="100%">
2963+ <table border="0" cellpadding="0" cellspacing="0">
2964+ <tr><th class="navbar" align="center"
2965+ ><a class="navbar" target="_top" href="https://launchpad.net/py-script">Project Homepage</a></th>
2966+ </tr></table></th>
2967+ </tr>
2968+</table>
2969+<table width="100%" cellpadding="0" cellspacing="0">
2970+ <tr valign="top">
2971+ <td width="100%">
2972+ <span class="breadcrumbs">
2973+ Package&nbsp;scriptutil
2974+ </span>
2975+ </td>
2976+ <td>
2977+ <table cellpadding="0" cellspacing="0">
2978+ <!-- hide/show private -->
2979+ <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
2980+ onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
2981+ <tr><td align="right"><span class="options"
2982+ >[<a href="frames.html" target="_top">frames</a
2983+ >]&nbsp;|&nbsp;<a href="scriptutil-module.html"
2984+ target="_top">no&nbsp;frames</a>]</span></td></tr>
2985+ </table>
2986+ </td>
2987+ </tr>
2988+</table>
2989+<!-- ==================== PACKAGE DESCRIPTION ==================== -->
2990+<h1 class="epydoc">Package scriptutil</h1><p class="nomargin-top"><span class="codelink"><a href="scriptutil-pysrc.html">source&nbsp;code</a></span></p>
2991+<!-- ==================== SUBMODULES ==================== -->
2992+<a name="section-Submodules"></a>
2993+<table class="summary" border="1" cellpadding="3"
2994+ cellspacing="0" width="100%" bgcolor="white">
2995+<tr bgcolor="#70b0f0" class="table-header">
2996+ <td colspan="2" class="table-header">
2997+ <table border="0" cellpadding="0" cellspacing="0" width="100%">
2998+ <tr valign="top">
2999+ <td align="left"><span class="table-header">Submodules</span></td>
3000+ <td align="right" valign="top"
3001+ ><span class="options">[<a href="#section-Submodules"
3002+ class="privatelink" onclick="toggle_private();"
3003+ >hide private</a>]</span></td>
3004+ </tr>
3005+ </table>
3006+ </td>
3007+</tr>
3008+ <tr><td class="summary">
3009+ <ul class="nomargin">
3010+ <li> <strong class="uidlink"><a href="scriptutil.find-module.html">scriptutil.find</a></strong>: <em class="summary">Functions commonly used in shell scripting:</em> </li>
3011+ </ul></td></tr>
3012+</table>
3013+
3014+<br />
3015+<!-- ==================== VARIABLES ==================== -->
3016+<a name="section-Variables"></a>
3017+<table class="summary" border="1" cellpadding="3"
3018+ cellspacing="0" width="100%" bgcolor="white">
3019+<tr bgcolor="#70b0f0" class="table-header">
3020+ <td colspan="2" class="table-header">
3021+ <table border="0" cellpadding="0" cellspacing="0" width="100%">
3022+ <tr valign="top">
3023+ <td align="left"><span class="table-header">Variables</span></td>
3024+ <td align="right" valign="top"
3025+ ><span class="options">[<a href="#section-Variables"
3026+ class="privatelink" onclick="toggle_private();"
3027+ >hide private</a>]</span></td>
3028+ </tr>
3029+ </table>
3030+ </td>
3031+</tr>
3032+<tr>
3033+ <td width="15%" align="right" valign="top" class="summary">
3034+ <span class="summary-type">&nbsp;</span>
3035+ </td><td class="summary">
3036+ <a name="__package__"></a><span class="summary-name">__package__</span> = <code title="None">None</code>
3037+ </td>
3038+ </tr>
3039+</table>
3040+<!-- ==================== NAVIGATION BAR ==================== -->
3041+<table class="navbar" border="0" width="100%" cellpadding="0"
3042+ bgcolor="#a0c0ff" cellspacing="0">
3043+ <tr valign="middle">
3044+ <!-- Home link -->
3045+ <th bgcolor="#70b0f0" class="navbar-select"
3046+ >&nbsp;&nbsp;&nbsp;Home&nbsp;&nbsp;&nbsp;</th>
3047+
3048+ <!-- Tree link -->
3049+ <th>&nbsp;&nbsp;&nbsp;<a
3050+ href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
3051+
3052+ <!-- Index link -->
3053+ <th>&nbsp;&nbsp;&nbsp;<a
3054+ href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
3055+
3056+ <!-- Help link -->
3057+ <th>&nbsp;&nbsp;&nbsp;<a
3058+ href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
3059+
3060+ <!-- Project homepage -->
3061+ <th class="navbar" align="right" width="100%">
3062+ <table border="0" cellpadding="0" cellspacing="0">
3063+ <tr><th class="navbar" align="center"
3064+ ><a class="navbar" target="_top" href="https://launchpad.net/py-script">Project Homepage</a></th>
3065+ </tr></table></th>
3066+ </tr>
3067+</table>
3068+<table border="0" cellpadding="0" cellspacing="0" width="100%%">
3069+ <tr>
3070+ <td align="left" class="footer">
3071+ Generated by Epydoc 3.0.1 on Sat Dec 26 23:01:34 2009
3072+ </td>
3073+ <td align="right" class="footer">
3074+ <a target="mainFrame" href="http://epydoc.sourceforge.net"
3075+ >http://epydoc.sourceforge.net</a>
3076+ </td>
3077+ </tr>
3078+</table>
3079+
3080+<script type="text/javascript">
3081+ <!--
3082+ // Private objects are initially displayed (because if
3083+ // javascript is turned off then we want them to be
3084+ // visible); but by default, we want to hide them. So hide
3085+ // them unless we have a cookie that says to show them.
3086+ checkCookie();
3087+ // -->
3088+</script>
3089+</body>
3090+</html>
3091
3092=== removed file 'doc/html/scriptutil-module.html'
3093--- doc/html/scriptutil-module.html 2009-12-26 20:49:38 +0000
3094+++ doc/html/scriptutil-module.html 1970-01-01 00:00:00 +0000
3095@@ -1,509 +0,0 @@
3096-<?xml version="1.0" encoding="ascii"?>
3097-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
3098- "DTD/xhtml1-transitional.dtd">
3099-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
3100-<head>
3101- <title>scriptutil</title>
3102- <link rel="stylesheet" href="epydoc.css" type="text/css" />
3103- <script type="text/javascript" src="epydoc.js"></script>
3104-</head>
3105-
3106-<body bgcolor="white" text="black" link="blue" vlink="#204080"
3107- alink="#204080">
3108-<!-- ==================== NAVIGATION BAR ==================== -->
3109-<table class="navbar" border="0" width="100%" cellpadding="0"
3110- bgcolor="#a0c0ff" cellspacing="0">
3111- <tr valign="middle">
3112- <!-- Home link -->
3113- <th bgcolor="#70b0f0" class="navbar-select"
3114- >&nbsp;&nbsp;&nbsp;Home&nbsp;&nbsp;&nbsp;</th>
3115-
3116- <!-- Tree link -->
3117- <th>&nbsp;&nbsp;&nbsp;<a
3118- href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
3119-
3120- <!-- Index link -->
3121- <th>&nbsp;&nbsp;&nbsp;<a
3122- href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
3123-
3124- <!-- Help link -->
3125- <th>&nbsp;&nbsp;&nbsp;<a
3126- href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
3127-
3128- <!-- Project homepage -->
3129- <th class="navbar" align="right" width="100%">
3130- <table border="0" cellpadding="0" cellspacing="0">
3131- <tr><th class="navbar" align="center"
3132- ><a class="navbar" target="_top" href="http://hrnjad.net/src/scriptutil">Module scriptutil</a></th>
3133- </tr></table></th>
3134- </tr>
3135-</table>
3136-<table width="100%" cellpadding="0" cellspacing="0">
3137- <tr valign="top">
3138- <td width="100%">
3139- <span class="breadcrumbs">
3140- Script&nbsp;scriptutil
3141- </span>
3142- </td>
3143- <td>
3144- <table cellpadding="0" cellspacing="0">
3145- <!-- hide/show private -->
3146- <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
3147- onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
3148- <tr><td align="right"><span class="options"
3149- >[<a href="frames.html" target="_top">frames</a
3150- >]&nbsp;|&nbsp;<a href="scriptutil-module.html"
3151- target="_top">no&nbsp;frames</a>]</span></td></tr>
3152- </table>
3153- </td>
3154- </tr>
3155-</table>
3156-<!-- ==================== MODULE DESCRIPTION ==================== -->
3157-<h1 class="epydoc">Module scriptutil</h1><span class="codelink"><a href="scriptutil-pysrc.html">source&nbsp;code</a></span><br /><br />
3158-<p>Copyright (c) 2008, Muharem Hrnjadovic</p>
3159- <p>All rights reserved.</p>
3160- Redistribution and use in source and binary forms, with or without
3161- modification, are permitted provided that the following conditions are
3162- met:
3163- <ul>
3164- <li>
3165- Redistributions of source code must retain the above copyright
3166- notice, this list of conditions and the following disclaimer.
3167- </li>
3168- <li>
3169- Redistributions in binary form must reproduce the above copyright
3170- notice, this list of conditions and the following disclaimer in the
3171- documentation and/or other materials provided with the
3172- distribution.
3173- </li>
3174- <li>
3175- Neither the name of Muharem Hrnjadovic nor the names of other
3176- contributors may be used to endorse or promote products derived from
3177- this software without specific prior written permission.
3178- </li>
3179- </ul>
3180- <p>THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
3181- &quot;AS IS&quot; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT
3182- NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
3183- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
3184- OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
3185- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
3186- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
3187- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
3188- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
3189- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
3190- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</p>
3191-
3192- <p>---------------------------------------------------------------------------</p>
3193- Module providing functions commonly used in shell scripting:
3194- <ul>
3195- <li>
3196- ffind() : finds files in a directory tree
3197- </li>
3198- <li>
3199- ffindgrep(): finds files in a directory tree and matches their
3200- content to regular expressions
3201- </li>
3202- <li>
3203- freplace() : in-place search/replace of files in a directory tree
3204- with regular expressions
3205- </li>
3206- <li>
3207- printr() : prints the results of the ffind()/ffindgrep()
3208- functions
3209- </li>
3210- </ul>
3211- Please see the <a
3212- href="http://muharem.wordpress.com/2007/05/20/python-find-files-using-unix-shell-style-wildcards/"
3213- target="_top">tutorial</a> as well as the documentation strings of the
3214- particular functions for detailed information.<br /><br />
3215-
3216-<hr />
3217-<div class="fields"> <p><strong>Version:</strong>
3218- 1.1
3219- </p>
3220-</div><!-- ==================== CLASSES ==================== -->
3221-<a name="section-Classes"></a>
3222-<table class="summary" border="1" cellpadding="3"
3223- cellspacing="0" width="100%" bgcolor="white">
3224-<tr bgcolor="#70b0f0" class="table-header">
3225- <td colspan="2" class="table-header">
3226- <table border="0" cellpadding="0" cellspacing="0" width="100%">
3227- <tr valign="top">
3228- <td align="left"><span class="table-header">Classes</span></td>
3229- <td align="right" valign="top"
3230- ><span class="options">[<a href="#section-Classes"
3231- class="privatelink" onclick="toggle_private();"
3232- >hide private</a>]</span></td>
3233- </tr>
3234- </table>
3235- </td>
3236-</tr>
3237-<tr>
3238- <td width="15%" align="right" valign="top" class="summary">
3239- <span class="summary-type">&nbsp;</span>
3240- </td><td class="summary">
3241- <a href="scriptutil.ScriptError-class.html" class="summary-name">ScriptError</a><br />
3242- The exception raised in case of failures.
3243- </td>
3244- </tr>
3245-</table>
3246-<!-- ==================== FUNCTIONS ==================== -->
3247-<a name="section-Functions"></a>
3248-<table class="summary" border="1" cellpadding="3"
3249- cellspacing="0" width="100%" bgcolor="white">
3250-<tr bgcolor="#70b0f0" class="table-header">
3251- <td colspan="2" class="table-header">
3252- <table border="0" cellpadding="0" cellspacing="0" width="100%">
3253- <tr valign="top">
3254- <td align="left"><span class="table-header">Functions</span></td>
3255- <td align="right" valign="top"
3256- ><span class="options">[<a href="#section-Functions"
3257- class="privatelink" onclick="toggle_private();"
3258- >hide private</a>]</span></td>
3259- </tr>
3260- </table>
3261- </td>
3262-</tr>
3263-<tr>
3264- <td width="15%" align="right" valign="top" class="summary">
3265- <span class="summary-type">sequence</span>
3266- </td><td class="summary">
3267- <table width="100%" cellpadding="0" cellspacing="0" border="0">
3268- <tr>
3269- <td><span class="summary-sig"><a href="scriptutil-module.html#ffind" class="summary-sig-name">ffind</a>(<span class="summary-sig-arg">path</span>,
3270- <span class="summary-sig-arg">shellglobs</span>=<span class="summary-sig-default">None</span>,
3271- <span class="summary-sig-arg">namefs</span>=<span class="summary-sig-default">None</span>,
3272- <span class="summary-sig-arg">relative</span>=<span class="summary-sig-default">True</span>)</span><br />
3273- Find files in the directory tree starting at 'path' (filtered by
3274- Unix shell-style wildcards ('shellglobs') and/or the functions in the
3275- 'namefs' sequence).</td>
3276- <td align="right" valign="top">
3277- <span class="codelink"><a href="scriptutil-pysrc.html#ffind">source&nbsp;code</a></span>
3278-
3279- </td>
3280- </tr>
3281- </table>
3282-
3283- </td>
3284- </tr>
3285-<tr>
3286- <td width="15%" align="right" valign="top" class="summary">
3287- <span class="summary-type">dict</span>
3288- </td><td class="summary">
3289- <table width="100%" cellpadding="0" cellspacing="0" border="0">
3290- <tr>
3291- <td><span class="summary-sig"><a href="scriptutil-module.html#ffindgrep" class="summary-sig-name">ffindgrep</a>(<span class="summary-sig-arg">path</span>,
3292- <span class="summary-sig-arg">regexl</span>,
3293- <span class="summary-sig-arg">shellglobs</span>=<span class="summary-sig-default">None</span>,
3294- <span class="summary-sig-arg">namefs</span>=<span class="summary-sig-default">None</span>,
3295- <span class="summary-sig-arg">relative</span>=<span class="summary-sig-default">True</span>,
3296- <span class="summary-sig-arg">linenums</span>=<span class="summary-sig-default">False</span>)</span><br />
3297- Find files in the directory tree starting at 'path' (filtered by
3298- Unix shell-style wildcards ('shellglobs') and/or the functions in the
3299- 'namefs' sequence) and search inside these.</td>
3300- <td align="right" valign="top">
3301- <span class="codelink"><a href="scriptutil-pysrc.html#ffindgrep">source&nbsp;code</a></span>
3302-
3303- </td>
3304- </tr>
3305- </table>
3306-
3307- </td>
3308- </tr>
3309-<tr>
3310- <td width="15%" align="right" valign="top" class="summary">
3311- <span class="summary-type">number</span>
3312- </td><td class="summary">
3313- <table width="100%" cellpadding="0" cellspacing="0" border="0">
3314- <tr>
3315- <td><span class="summary-sig"><a href="scriptutil-module.html#freplace" class="summary-sig-name">freplace</a>(<span class="summary-sig-arg">path</span>,
3316- <span class="summary-sig-arg">regexl</span>,
3317- <span class="summary-sig-arg">shellglobs</span>=<span class="summary-sig-default">None</span>,
3318- <span class="summary-sig-arg">namefs</span>=<span class="summary-sig-default">None</span>,
3319- <span class="summary-sig-arg">bext</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">.bak</code><code class="variable-quote">'</code></span>)</span><br />
3320- Find files in the directory tree starting at 'path' (filtered by
3321- Unix shell-style wildcards ('shellglobs') and/or the functions in the
3322- 'namefs' sequence) and perform an in-place search/replace operation
3323- on these.</td>
3324- <td align="right" valign="top">
3325- <span class="codelink"><a href="scriptutil-pysrc.html#freplace">source&nbsp;code</a></span>
3326-
3327- </td>
3328- </tr>
3329- </table>
3330-
3331- </td>
3332- </tr>
3333-<tr>
3334- <td width="15%" align="right" valign="top" class="summary">
3335- <span class="summary-type">&nbsp;</span>
3336- </td><td class="summary">
3337- <table width="100%" cellpadding="0" cellspacing="0" border="0">
3338- <tr>
3339- <td><span class="summary-sig"><a href="scriptutil-module.html#printr" class="summary-sig-name">printr</a>(<span class="summary-sig-arg">results</span>)</span><br />
3340- Print the results of the ffind()/ffindgrep() functions.</td>
3341- <td align="right" valign="top">
3342- <span class="codelink"><a href="scriptutil-pysrc.html#printr">source&nbsp;code</a></span>
3343-
3344- </td>
3345- </tr>
3346- </table>
3347-
3348- </td>
3349- </tr>
3350-</table>
3351-<!-- ==================== FUNCTION DETAILS ==================== -->
3352-<a name="section-FunctionDetails"></a>
3353-<table class="details" border="1" cellpadding="3"
3354- cellspacing="0" width="100%" bgcolor="white">
3355-<tr bgcolor="#70b0f0" class="table-header">
3356- <td colspan="2" class="table-header">
3357- <table border="0" cellpadding="0" cellspacing="0" width="100%">
3358- <tr valign="top">
3359- <td align="left"><span class="table-header">Function Details</span></td>
3360- <td align="right" valign="top"
3361- ><span class="options">[<a href="#section-FunctionDetails"
3362- class="privatelink" onclick="toggle_private();"
3363- >hide private</a>]</span></td>
3364- </tr>
3365- </table>
3366- </td>
3367-</tr>
3368-</table>
3369-<a name="ffind"></a>
3370-<div>
3371-<table class="details" border="1" cellpadding="3"
3372- cellspacing="0" width="100%" bgcolor="white">
3373-<tr><td>
3374- <table width="100%" cellpadding="0" cellspacing="0" border="0">
3375- <tr valign="top"><td>
3376- <h3 class="epydoc"><span class="sig"><span class="sig-name">ffind</span>(<span class="sig-arg">path</span>,
3377- <span class="sig-arg">shellglobs</span>=<span class="sig-default">None</span>,
3378- <span class="sig-arg">namefs</span>=<span class="sig-default">None</span>,
3379- <span class="sig-arg">relative</span>=<span class="sig-default">True</span>)</span>
3380- </h3>
3381- </td><td align="right" valign="top"
3382- ><span class="codelink"><a href="scriptutil-pysrc.html#ffind">source&nbsp;code</a></span>&nbsp;
3383- </td>
3384- </table>
3385-
3386- <p>Find files in the directory tree starting at 'path' (filtered by Unix
3387- shell-style wildcards ('shellglobs') and/or the functions in the 'namefs'
3388- sequence).</p>
3389- <p>Please not that the shell wildcards work in a cumulative fashion i.e.
3390- each of them is applied to the full set of file *names* found.</p>
3391- Conversely, all the functions in 'namefs'
3392- <ul>
3393- <li>
3394- only get to see the output of their respective predecessor
3395- function in the sequence (with the obvious exception of the first
3396- function)
3397- </li>
3398- <li>
3399- are applied to the full file *path* (whereas the shell-style
3400- wildcards are only applied to the file *names*)
3401- </li>
3402- </ul>
3403- <dl class="fields">
3404- <dt>Parameters:</dt>
3405- <dd><ul class="nomargin-top">
3406- <li><strong class="pname"><code>path</code></strong> (string) - starting path of the directory tree to be searched</li>
3407- <li><strong class="pname"><code>shellglobs</code></strong> (sequence) - an optional sequence of Unix shell-style wildcards that are to
3408- be applied to the file *names* found</li>
3409- <li><strong class="pname"><code>namefs</code></strong> (sequence) - an optional sequence of functions to be applied to the file
3410- *paths* found</li>
3411- <li><strong class="pname"><code>relative</code></strong> (bool) - a boolean flag that determines whether absolute or relative
3412- paths should be returned</li>
3413- </ul></dd>
3414- <dt>Returns: sequence</dt>
3415- <dd>paths for files found</dd>
3416- </dl>
3417-</td></tr></table>
3418-</div>
3419-<a name="ffindgrep"></a>
3420-<div>
3421-<table class="details" border="1" cellpadding="3"
3422- cellspacing="0" width="100%" bgcolor="white">
3423-<tr><td>
3424- <table width="100%" cellpadding="0" cellspacing="0" border="0">
3425- <tr valign="top"><td>
3426- <h3 class="epydoc"><span class="sig"><span class="sig-name">ffindgrep</span>(<span class="sig-arg">path</span>,
3427- <span class="sig-arg">regexl</span>,
3428- <span class="sig-arg">shellglobs</span>=<span class="sig-default">None</span>,
3429- <span class="sig-arg">namefs</span>=<span class="sig-default">None</span>,
3430- <span class="sig-arg">relative</span>=<span class="sig-default">True</span>,
3431- <span class="sig-arg">linenums</span>=<span class="sig-default">False</span>)</span>
3432- </h3>
3433- </td><td align="right" valign="top"
3434- ><span class="codelink"><a href="scriptutil-pysrc.html#ffindgrep">source&nbsp;code</a></span>&nbsp;
3435- </td>
3436- </table>
3437-
3438- <p>Find files in the directory tree starting at 'path' (filtered by Unix
3439- shell-style wildcards ('shellglobs') and/or the functions in the 'namefs'
3440- sequence) and search inside these.</p>
3441- Additionaly, the file content will be filtered by the regular
3442- expressions in the 'regexl' sequence. Each entry in the latter is a
3443- <ul>
3444- <li>
3445- either a string (with the regex definition)
3446- </li>
3447- <li>
3448- or a tuple with arguments accepted by re.compile() (the re.M and
3449- re.S flags will have no effect though)
3450- </li>
3451- </ul>
3452- For all the files that pass the file name/content tests the function
3453- returns a dictionary where the
3454- <ul>
3455- <li>
3456- key is the file name and the
3457- </li>
3458- <li>
3459- value is a string with lines filtered by 'regexl'
3460- </li>
3461- </ul>
3462- <dl class="fields">
3463- <dt>Parameters:</dt>
3464- <dd><ul class="nomargin-top">
3465- <li><strong class="pname"><code>path</code></strong> (string) - starting path of the directory tree to be searched</li>
3466- <li><strong class="pname"><code>shellglobs</code></strong> (sequence) - an optional sequence of Unix shell-style wildcards that are to
3467- be applied to the file *names* found</li>
3468- <li><strong class="pname"><code>namefs</code></strong> (sequence) - an optional sequence of functions to be applied to the file
3469- *paths* found</li>
3470- <li><strong class="pname"><code>relative</code></strong> (bool) - a boolean flag that determines whether absolute or relative
3471- paths should be returned</li>
3472- <li><strong class="pname"><code>linenums</code></strong> (bool) - turns on line numbers for found files (like grep -n)</li>
3473- </ul></dd>
3474- <dt>Returns: dict</dt>
3475- <dd>file name (key) and lines filtered by 'regexl' (value)</dd>
3476- </dl>
3477-</td></tr></table>
3478-</div>
3479-<a name="freplace"></a>
3480-<div>
3481-<table class="details" border="1" cellpadding="3"
3482- cellspacing="0" width="100%" bgcolor="white">
3483-<tr><td>
3484- <table width="100%" cellpadding="0" cellspacing="0" border="0">
3485- <tr valign="top"><td>
3486- <h3 class="epydoc"><span class="sig"><span class="sig-name">freplace</span>(<span class="sig-arg">path</span>,
3487- <span class="sig-arg">regexl</span>,
3488- <span class="sig-arg">shellglobs</span>=<span class="sig-default">None</span>,
3489- <span class="sig-arg">namefs</span>=<span class="sig-default">None</span>,
3490- <span class="sig-arg">bext</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">.bak</code><code class="variable-quote">'</code></span>)</span>
3491- </h3>
3492- </td><td align="right" valign="top"
3493- ><span class="codelink"><a href="scriptutil-pysrc.html#freplace">source&nbsp;code</a></span>&nbsp;
3494- </td>
3495- </table>
3496-
3497- <p>Find files in the directory tree starting at 'path' (filtered by Unix
3498- shell-style wildcards ('shellglobs') and/or the functions in the 'namefs'
3499- sequence) and perform an in-place search/replace operation on these.</p>
3500- <p>Additionally, an in-place search/replace operation is performed on the
3501- content of all the files (whose names passed the tests) using the regular
3502- expressions in 'regexl'.</p>
3503- Please note: 'regexl' is a sequence of 3-tuples, each having the
3504- following elements:
3505- <ul>
3506- <li>
3507- search string (Python regex syntax)
3508- </li>
3509- <li>
3510- replace string (Python regex syntax)
3511- </li>
3512- <li>
3513- regex flags or 'None' (re.compile syntax)
3514- </li>
3515- </ul>
3516- Copies of the modified files are saved in backup files using the
3517- extension specified in 'bext'.
3518- <dl class="fields">
3519- <dt>Parameters:</dt>
3520- <dd><ul class="nomargin-top">
3521- <li><strong class="pname"><code>path</code></strong> (string) - starting path of the directory tree to be searched</li>
3522- <li><strong class="pname"><code>shellglobs</code></strong> (sequence) - an optional sequence of Unix shell-style wildcards that are to
3523- be applied to the file *names* found</li>
3524- <li><strong class="pname"><code>namefs</code></strong> (sequence) - an optional sequence of functions to be applied to the file
3525- *paths* found</li>
3526- </ul></dd>
3527- <dt>Returns: number</dt>
3528- <dd>total number of files modified</dd>
3529- </dl>
3530-</td></tr></table>
3531-</div>
3532-<a name="printr"></a>
3533-<div>
3534-<table class="details" border="1" cellpadding="3"
3535- cellspacing="0" width="100%" bgcolor="white">
3536-<tr><td>
3537- <table width="100%" cellpadding="0" cellspacing="0" border="0">
3538- <tr valign="top"><td>
3539- <h3 class="epydoc"><span class="sig"><span class="sig-name">printr</span>(<span class="sig-arg">results</span>)</span>
3540- </h3>
3541- </td><td align="right" valign="top"
3542- ><span class="codelink"><a href="scriptutil-pysrc.html#printr">source&nbsp;code</a></span>&nbsp;
3543- </td>
3544- </table>
3545-
3546- <p>Print the results of the ffind()/ffindgrep() functions.</p>
3547- The output format is similar to the one used by the UNIX find
3548- utility.
3549- <dl class="fields">
3550- </dl>
3551-</td></tr></table>
3552-</div>
3553-<br />
3554-<!-- ==================== NAVIGATION BAR ==================== -->
3555-<table class="navbar" border="0" width="100%" cellpadding="0"
3556- bgcolor="#a0c0ff" cellspacing="0">
3557- <tr valign="middle">
3558- <!-- Home link -->
3559- <th bgcolor="#70b0f0" class="navbar-select"
3560- >&nbsp;&nbsp;&nbsp;Home&nbsp;&nbsp;&nbsp;</th>
3561-
3562- <!-- Tree link -->
3563- <th>&nbsp;&nbsp;&nbsp;<a
3564- href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
3565-
3566- <!-- Index link -->
3567- <th>&nbsp;&nbsp;&nbsp;<a
3568- href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
3569-
3570- <!-- Help link -->
3571- <th>&nbsp;&nbsp;&nbsp;<a
3572- href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
3573-
3574- <!-- Project homepage -->
3575- <th class="navbar" align="right" width="100%">
3576- <table border="0" cellpadding="0" cellspacing="0">
3577- <tr><th class="navbar" align="center"
3578- ><a class="navbar" target="_top" href="http://hrnjad.net/src/scriptutil">Module scriptutil</a></th>
3579- </tr></table></th>
3580- </tr>
3581-</table>
3582-<table border="0" cellpadding="0" cellspacing="0" width="100%%">
3583- <tr>
3584- <td align="left" class="footer">
3585- Generated by Epydoc 3.0beta1 on Thu May 22 18:10:51 2008
3586- </td>
3587- <td align="right" class="footer">
3588- <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
3589- </td>
3590- </tr>
3591-</table>
3592-
3593-<script type="text/javascript">
3594- <!--
3595- // Private objects are initially displayed (because if
3596- // javascript is turned off then we want them to be
3597- // visible); but by default, we want to hide them. So hide
3598- // them unless we have a cookie that says to show them.
3599- checkCookie()
3600- // -->
3601-</script>
3602-
3603-</body>
3604-</html>
3605
3606=== added file 'doc/html/scriptutil-pysrc.html'
3607--- doc/html/scriptutil-pysrc.html 1970-01-01 00:00:00 +0000
3608+++ doc/html/scriptutil-pysrc.html 2009-12-26 22:06:14 +0000
3609@@ -0,0 +1,121 @@
3610+<?xml version="1.0" encoding="ascii"?>
3611+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
3612+ "DTD/xhtml1-transitional.dtd">
3613+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
3614+<head>
3615+ <title>scriptutil</title>
3616+ <link rel="stylesheet" href="epydoc.css" type="text/css" />
3617+ <script type="text/javascript" src="epydoc.js"></script>
3618+</head>
3619+
3620+<body bgcolor="white" text="black" link="blue" vlink="#204080"
3621+ alink="#204080">
3622+<!-- ==================== NAVIGATION BAR ==================== -->
3623+<table class="navbar" border="0" width="100%" cellpadding="0"
3624+ bgcolor="#a0c0ff" cellspacing="0">
3625+ <tr valign="middle">
3626+ <!-- Home link -->
3627+ <th bgcolor="#70b0f0" class="navbar-select"
3628+ >&nbsp;&nbsp;&nbsp;Home&nbsp;&nbsp;&nbsp;</th>
3629+
3630+ <!-- Tree link -->
3631+ <th>&nbsp;&nbsp;&nbsp;<a
3632+ href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
3633+
3634+ <!-- Index link -->
3635+ <th>&nbsp;&nbsp;&nbsp;<a
3636+ href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
3637+
3638+ <!-- Help link -->
3639+ <th>&nbsp;&nbsp;&nbsp;<a
3640+ href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
3641+
3642+ <!-- Project homepage -->
3643+ <th class="navbar" align="right" width="100%">
3644+ <table border="0" cellpadding="0" cellspacing="0">
3645+ <tr><th class="navbar" align="center"
3646+ ><a class="navbar" target="_top" href="https://launchpad.net/py-script">Project Homepage</a></th>
3647+ </tr></table></th>
3648+ </tr>
3649+</table>
3650+<table width="100%" cellpadding="0" cellspacing="0">
3651+ <tr valign="top">
3652+ <td width="100%">
3653+ <span class="breadcrumbs">
3654+ Package&nbsp;scriptutil
3655+ </span>
3656+ </td>
3657+ <td>
3658+ <table cellpadding="0" cellspacing="0">
3659+ <!-- hide/show private -->
3660+ <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
3661+ onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
3662+ <tr><td align="right"><span class="options"
3663+ >[<a href="frames.html" target="_top">frames</a
3664+ >]&nbsp;|&nbsp;<a href="scriptutil-pysrc.html"
3665+ target="_top">no&nbsp;frames</a>]</span></td></tr>
3666+ </table>
3667+ </td>
3668+ </tr>
3669+</table>
3670+<h1 class="epydoc">Source Code for <a href="scriptutil-module.html">Package scriptutil</a></h1>
3671+<pre class="py-src">
3672+<a name="L1"></a><tt class="py-lineno">1</tt> <tt class="py-line"> </tt>
3673+<a name="L2"></a><tt class="py-lineno">2</tt> <tt class="py-line"> </tt><script type="text/javascript">
3674+<!--
3675+expandto(location.href);
3676+// -->
3677+</script>
3678+</pre>
3679+<br />
3680+<!-- ==================== NAVIGATION BAR ==================== -->
3681+<table class="navbar" border="0" width="100%" cellpadding="0"
3682+ bgcolor="#a0c0ff" cellspacing="0">
3683+ <tr valign="middle">
3684+ <!-- Home link -->
3685+ <th bgcolor="#70b0f0" class="navbar-select"
3686+ >&nbsp;&nbsp;&nbsp;Home&nbsp;&nbsp;&nbsp;</th>
3687+
3688+ <!-- Tree link -->
3689+ <th>&nbsp;&nbsp;&nbsp;<a
3690+ href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
3691+
3692+ <!-- Index link -->
3693+ <th>&nbsp;&nbsp;&nbsp;<a
3694+ href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
3695+
3696+ <!-- Help link -->
3697+ <th>&nbsp;&nbsp;&nbsp;<a
3698+ href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
3699+
3700+ <!-- Project homepage -->
3701+ <th class="navbar" align="right" width="100%">
3702+ <table border="0" cellpadding="0" cellspacing="0">
3703+ <tr><th class="navbar" align="center"
3704+ ><a class="navbar" target="_top" href="https://launchpad.net/py-script">Project Homepage</a></th>
3705+ </tr></table></th>
3706+ </tr>
3707+</table>
3708+<table border="0" cellpadding="0" cellspacing="0" width="100%%">
3709+ <tr>
3710+ <td align="left" class="footer">
3711+ Generated by Epydoc 3.0.1 on Sat Dec 26 23:01:34 2009
3712+ </td>
3713+ <td align="right" class="footer">
3714+ <a target="mainFrame" href="http://epydoc.sourceforge.net"
3715+ >http://epydoc.sourceforge.net</a>
3716+ </td>
3717+ </tr>
3718+</table>
3719+
3720+<script type="text/javascript">
3721+ <!--
3722+ // Private objects are initially displayed (because if
3723+ // javascript is turned off then we want them to be
3724+ // visible); but by default, we want to hide them. So hide
3725+ // them unless we have a cookie that says to show them.
3726+ checkCookie();
3727+ // -->
3728+</script>
3729+</body>
3730+</html>
3731
3732=== removed file 'doc/html/scriptutil-pysrc.html'
3733--- doc/html/scriptutil-pysrc.html 2009-12-26 20:49:38 +0000
3734+++ doc/html/scriptutil-pysrc.html 1970-01-01 00:00:00 +0000
3735@@ -1,388 +0,0 @@
3736-<?xml version="1.0" encoding="ascii"?>
3737-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
3738- "DTD/xhtml1-transitional.dtd">
3739-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
3740-<head>
3741- <title>scriptutil</title>
3742- <link rel="stylesheet" href="epydoc.css" type="text/css" />
3743- <script type="text/javascript" src="epydoc.js"></script>
3744-</head>
3745-
3746-<body bgcolor="white" text="black" link="blue" vlink="#204080"
3747- alink="#204080">
3748-<!-- ==================== NAVIGATION BAR ==================== -->
3749-<table class="navbar" border="0" width="100%" cellpadding="0"
3750- bgcolor="#a0c0ff" cellspacing="0">
3751- <tr valign="middle">
3752- <!-- Home link -->
3753- <th bgcolor="#70b0f0" class="navbar-select"
3754- >&nbsp;&nbsp;&nbsp;Home&nbsp;&nbsp;&nbsp;</th>
3755-
3756- <!-- Tree link -->
3757- <th>&nbsp;&nbsp;&nbsp;<a
3758- href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
3759-
3760- <!-- Index link -->
3761- <th>&nbsp;&nbsp;&nbsp;<a
3762- href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
3763-
3764- <!-- Help link -->
3765- <th>&nbsp;&nbsp;&nbsp;<a
3766- href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
3767-
3768- <!-- Project homepage -->
3769- <th class="navbar" align="right" width="100%">
3770- <table border="0" cellpadding="0" cellspacing="0">
3771- <tr><th class="navbar" align="center"
3772- ><a class="navbar" target="_top" href="http://hrnjad.net/src/scriptutil">Module scriptutil</a></th>
3773- </tr></table></th>
3774- </tr>
3775-</table>
3776-<table width="100%" cellpadding="0" cellspacing="0">
3777- <tr valign="top">
3778- <td width="100%">
3779- <span class="breadcrumbs">
3780- Script&nbsp;scriptutil
3781- </span>
3782- </td>
3783- <td>
3784- <table cellpadding="0" cellspacing="0">
3785- <!-- hide/show private -->
3786- <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
3787- onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
3788- <tr><td align="right"><span class="options"
3789- >[<a href="frames.html" target="_top">frames</a
3790- >]&nbsp;|&nbsp;<a href="scriptutil-pysrc.html"
3791- target="_top">no&nbsp;frames</a>]</span></td></tr>
3792- </table>
3793- </td>
3794- </tr>
3795-</table>
3796-<h1 class="epydoc">Source Code for <a href="scriptutil-module.html">Script scriptutil</a></h1>
3797-<pre class="py-src">
3798-<a name="L1"></a><tt class="py-lineno"> 1</tt> <tt class="py-line"><tt class="py-comment">#!/usr/bin/env python</tt> </tt>
3799-<a name="L2"></a><tt class="py-lineno"> 2</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># encoding: utf-8</tt> </tt>
3800-<a name="L3"></a><tt class="py-lineno"> 3</tt> <tt class="py-line"><tt class="py-comment"></tt> </tt>
3801-<a name="L4"></a><tt class="py-lineno"> 4</tt> <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
3802-<a name="L5"></a><tt class="py-lineno"> 5</tt> <tt class="py-line"><tt class="py-docstring">Copyright (c) 2008, Muharem Hrnjadovic</tt> </tt>
3803-<a name="L6"></a><tt class="py-lineno"> 6</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
3804-<a name="L7"></a><tt class="py-lineno"> 7</tt> <tt class="py-line"><tt class="py-docstring">All rights reserved.</tt> </tt>
3805-<a name="L8"></a><tt class="py-lineno"> 8</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
3806-<a name="L9"></a><tt class="py-lineno"> 9</tt> <tt class="py-line"><tt class="py-docstring">Redistribution and use in source and binary forms, with or without </tt> </tt>
3807-<a name="L10"></a><tt class="py-lineno"> 10</tt> <tt class="py-line"><tt class="py-docstring">modification, are permitted provided that the following conditions</tt> </tt>
3808-<a name="L11"></a><tt class="py-lineno"> 11</tt> <tt class="py-line"><tt class="py-docstring">are met:</tt> </tt>
3809-<a name="L12"></a><tt class="py-lineno"> 12</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
3810-<a name="L13"></a><tt class="py-lineno"> 13</tt> <tt class="py-line"><tt class="py-docstring"> - Redistributions of source code must retain the above copyright notice,</tt> </tt>
3811-<a name="L14"></a><tt class="py-lineno"> 14</tt> <tt class="py-line"><tt class="py-docstring"> this list of conditions and the following disclaimer.</tt> </tt>
3812-<a name="L15"></a><tt class="py-lineno"> 15</tt> <tt class="py-line"><tt class="py-docstring"> - Redistributions in binary form must reproduce the above copyright</tt> </tt>
3813-<a name="L16"></a><tt class="py-lineno"> 16</tt> <tt class="py-line"><tt class="py-docstring"> notice, this list of conditions and the following disclaimer in the</tt> </tt>
3814-<a name="L17"></a><tt class="py-lineno"> 17</tt> <tt class="py-line"><tt class="py-docstring"> documentation and/or other materials provided with the distribution.</tt> </tt>
3815-<a name="L18"></a><tt class="py-lineno"> 18</tt> <tt class="py-line"><tt class="py-docstring"> - Neither the name of Muharem Hrnjadovic nor the names of other</tt> </tt>
3816-<a name="L19"></a><tt class="py-lineno"> 19</tt> <tt class="py-line"><tt class="py-docstring"> contributors may be used to endorse or promote products derived from</tt> </tt>
3817-<a name="L20"></a><tt class="py-lineno"> 20</tt> <tt class="py-line"><tt class="py-docstring"> this software without specific prior written permission.</tt> </tt>
3818-<a name="L21"></a><tt class="py-lineno"> 21</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
3819-<a name="L22"></a><tt class="py-lineno"> 22</tt> <tt class="py-line"><tt class="py-docstring">THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS</tt> </tt>
3820-<a name="L23"></a><tt class="py-lineno"> 23</tt> <tt class="py-line"><tt class="py-docstring">"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT</tt> </tt>
3821-<a name="L24"></a><tt class="py-lineno"> 24</tt> <tt class="py-line"><tt class="py-docstring">LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR</tt> </tt>
3822-<a name="L25"></a><tt class="py-lineno"> 25</tt> <tt class="py-line"><tt class="py-docstring">A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR</tt> </tt>
3823-<a name="L26"></a><tt class="py-lineno"> 26</tt> <tt class="py-line"><tt class="py-docstring">CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,</tt> </tt>
3824-<a name="L27"></a><tt class="py-lineno"> 27</tt> <tt class="py-line"><tt class="py-docstring">EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,</tt> </tt>
3825-<a name="L28"></a><tt class="py-lineno"> 28</tt> <tt class="py-line"><tt class="py-docstring">PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR</tt> </tt>
3826-<a name="L29"></a><tt class="py-lineno"> 29</tt> <tt class="py-line"><tt class="py-docstring">PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF</tt> </tt>
3827-<a name="L30"></a><tt class="py-lineno"> 30</tt> <tt class="py-line"><tt class="py-docstring">LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING</tt> </tt>
3828-<a name="L31"></a><tt class="py-lineno"> 31</tt> <tt class="py-line"><tt class="py-docstring">NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS</tt> </tt>
3829-<a name="L32"></a><tt class="py-lineno"> 32</tt> <tt class="py-line"><tt class="py-docstring">SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</tt> </tt>
3830-<a name="L33"></a><tt class="py-lineno"> 33</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
3831-<a name="L34"></a><tt class="py-lineno"> 34</tt> <tt class="py-line"><tt class="py-docstring">---------------------------------------------------------------------------</tt> </tt>
3832-<a name="L35"></a><tt class="py-lineno"> 35</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
3833-<a name="L36"></a><tt class="py-lineno"> 36</tt> <tt class="py-line"><tt class="py-docstring">Module providing functions commonly used in shell scripting:</tt> </tt>
3834-<a name="L37"></a><tt class="py-lineno"> 37</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
3835-<a name="L38"></a><tt class="py-lineno"> 38</tt> <tt class="py-line"><tt class="py-docstring"> - ffind() : finds files in a directory tree</tt> </tt>
3836-<a name="L39"></a><tt class="py-lineno"> 39</tt> <tt class="py-line"><tt class="py-docstring"> - ffindgrep(): finds files in a directory tree and matches their</tt> </tt>
3837-<a name="L40"></a><tt class="py-lineno"> 40</tt> <tt class="py-line"><tt class="py-docstring"> content to regular expressions</tt> </tt>
3838-<a name="L41"></a><tt class="py-lineno"> 41</tt> <tt class="py-line"><tt class="py-docstring"> - freplace() : in-place search/replace of files in a directory tree</tt> </tt>
3839-<a name="L42"></a><tt class="py-lineno"> 42</tt> <tt class="py-line"><tt class="py-docstring"> with regular expressions</tt> </tt>
3840-<a name="L43"></a><tt class="py-lineno"> 43</tt> <tt class="py-line"><tt class="py-docstring"> - printr() : prints the results of the ffind()/ffindgrep() functions</tt> </tt>
3841-<a name="L44"></a><tt class="py-lineno"> 44</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
3842-<a name="L45"></a><tt class="py-lineno"> 45</tt> <tt class="py-line"><tt class="py-docstring">Please see the U{tutorial &lt;http://muharem.wordpress.com/2007/05/20/python-find-files-using-unix-shell-style-wildcards/&gt;} as well as the documentation strings of the particular functions for detailed information.</tt> </tt>
3843-<a name="L46"></a><tt class="py-lineno"> 46</tt> <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
3844-<a name="L47"></a><tt class="py-lineno"> 47</tt> <tt class="py-line"> </tt>
3845-<a name="L48"></a><tt class="py-lineno"> 48</tt> <tt class="py-line"><tt class="py-name">__version__</tt> <tt class="py-op">=</tt> <tt class="py-string">"1.1"</tt> </tt>
3846-<a name="L49"></a><tt class="py-lineno"> 49</tt> <tt class="py-line"> </tt>
3847-<a name="L50"></a><tt class="py-lineno"> 50</tt> <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">fnmatch</tt><tt class="py-op">,</tt> <tt class="py-name">itertools</tt><tt class="py-op">,</tt> <tt class="py-name">os</tt><tt class="py-op">,</tt> <tt class="py-name">sys</tt><tt class="py-op">,</tt> <tt class="py-name">re</tt><tt class="py-op">,</tt> <tt class="py-name">types</tt> </tt>
3848-<a name="L51"></a><tt class="py-lineno"> 51</tt> <tt class="py-line"> </tt>
3849-<a name="ScriptError"></a><div id="ScriptError-def"><a name="L52"></a><tt class="py-lineno"> 52</tt> <a class="py-toggle" href="#" id="ScriptError-toggle" onclick="return toggle('ScriptError');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="scriptutil.ScriptError-class.html">ScriptError</a><tt class="py-op">(</tt><tt class="py-base-class">Exception</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
3850-</div><div id="ScriptError-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="ScriptError-expanded"><a name="L53"></a><tt class="py-lineno"> 53</tt> <tt class="py-line"> <tt class="py-docstring">"""The exception raised in case of failures."""</tt> </tt>
3851-</div><a name="L54"></a><tt class="py-lineno"> 54</tt> <tt class="py-line"> </tt>
3852-<a name="ffind"></a><div id="ffind-def"><a name="L55"></a><tt class="py-lineno"> 55</tt> <a class="py-toggle" href="#" id="ffind-toggle" onclick="return toggle('ffind');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="scriptutil-module.html#ffind">ffind</a><tt class="py-op">(</tt><tt class="py-param">path</tt><tt class="py-op">,</tt> <tt class="py-param">shellglobs</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">namefs</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">relative</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
3853-</div><div id="ffind-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="ffind-expanded"><a name="L56"></a><tt class="py-lineno"> 56</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
3854-<a name="L57"></a><tt class="py-lineno"> 57</tt> <tt class="py-line"><tt class="py-docstring"> Find files in the directory tree starting at 'path' (filtered by</tt> </tt>
3855-<a name="L58"></a><tt class="py-lineno"> 58</tt> <tt class="py-line"><tt class="py-docstring"> Unix shell-style wildcards ('shellglobs') and/or the functions in</tt> </tt>
3856-<a name="L59"></a><tt class="py-lineno"> 59</tt> <tt class="py-line"><tt class="py-docstring"> the 'namefs' sequence).</tt> </tt>
3857-<a name="L60"></a><tt class="py-lineno"> 60</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
3858-<a name="L61"></a><tt class="py-lineno"> 61</tt> <tt class="py-line"><tt class="py-docstring"> Please not that the shell wildcards work in a cumulative fashion</tt> </tt>
3859-<a name="L62"></a><tt class="py-lineno"> 62</tt> <tt class="py-line"><tt class="py-docstring"> i.e. each of them is applied to the full set of file *names* found.</tt> </tt>
3860-<a name="L63"></a><tt class="py-lineno"> 63</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
3861-<a name="L64"></a><tt class="py-lineno"> 64</tt> <tt class="py-line"><tt class="py-docstring"> Conversely, all the functions in 'namefs'</tt> </tt>
3862-<a name="L65"></a><tt class="py-lineno"> 65</tt> <tt class="py-line"><tt class="py-docstring"> - only get to see the output of their respective predecessor</tt> </tt>
3863-<a name="L66"></a><tt class="py-lineno"> 66</tt> <tt class="py-line"><tt class="py-docstring"> function in the sequence (with the obvious exception of the</tt> </tt>
3864-<a name="L67"></a><tt class="py-lineno"> 67</tt> <tt class="py-line"><tt class="py-docstring"> first function)</tt> </tt>
3865-<a name="L68"></a><tt class="py-lineno"> 68</tt> <tt class="py-line"><tt class="py-docstring"> - are applied to the full file *path* (whereas the shell-style</tt> </tt>
3866-<a name="L69"></a><tt class="py-lineno"> 69</tt> <tt class="py-line"><tt class="py-docstring"> wildcards are only applied to the file *names*)</tt> </tt>
3867-<a name="L70"></a><tt class="py-lineno"> 70</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
3868-<a name="L71"></a><tt class="py-lineno"> 71</tt> <tt class="py-line"><tt class="py-docstring"> @type path: string</tt> </tt>
3869-<a name="L72"></a><tt class="py-lineno"> 72</tt> <tt class="py-line"><tt class="py-docstring"> @param path: starting path of the directory tree to be searched</tt> </tt>
3870-<a name="L73"></a><tt class="py-lineno"> 73</tt> <tt class="py-line"><tt class="py-docstring"> @type shellglobs: sequence</tt> </tt>
3871-<a name="L74"></a><tt class="py-lineno"> 74</tt> <tt class="py-line"><tt class="py-docstring"> @param shellglobs: an optional sequence of Unix shell-style wildcards</tt> </tt>
3872-<a name="L75"></a><tt class="py-lineno"> 75</tt> <tt class="py-line"><tt class="py-docstring"> that are to be applied to the file *names* found</tt> </tt>
3873-<a name="L76"></a><tt class="py-lineno"> 76</tt> <tt class="py-line"><tt class="py-docstring"> @type namefs: sequence</tt> </tt>
3874-<a name="L77"></a><tt class="py-lineno"> 77</tt> <tt class="py-line"><tt class="py-docstring"> @param namefs: an optional sequence of functions to be applied to the</tt> </tt>
3875-<a name="L78"></a><tt class="py-lineno"> 78</tt> <tt class="py-line"><tt class="py-docstring"> file *paths* found</tt> </tt>
3876-<a name="L79"></a><tt class="py-lineno"> 79</tt> <tt class="py-line"><tt class="py-docstring"> @type relative: bool</tt> </tt>
3877-<a name="L80"></a><tt class="py-lineno"> 80</tt> <tt class="py-line"><tt class="py-docstring"> @param relative: a boolean flag that determines whether absolute or</tt> </tt>
3878-<a name="L81"></a><tt class="py-lineno"> 81</tt> <tt class="py-line"><tt class="py-docstring"> relative paths should be returned</tt> </tt>
3879-<a name="L82"></a><tt class="py-lineno"> 82</tt> <tt class="py-line"><tt class="py-docstring"> @rtype: sequence</tt> </tt>
3880-<a name="L83"></a><tt class="py-lineno"> 83</tt> <tt class="py-line"><tt class="py-docstring"> @return: paths for files found</tt> </tt>
3881-<a name="L84"></a><tt class="py-lineno"> 84</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
3882-<a name="L85"></a><tt class="py-lineno"> 85</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">access</tt><tt class="py-op">(</tt><tt class="py-name">path</tt><tt class="py-op">,</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">R_OK</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
3883-<a name="L86"></a><tt class="py-lineno"> 86</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt id="link-0" class="py-name" targets="Class scriptutil.ScriptError=scriptutil.ScriptError-class.html"><a title="scriptutil.ScriptError" class="py-name" href="#" onclick="return doclink('link-0', 'ScriptError', 'link-0');">ScriptError</a></tt><tt class="py-op">(</tt><tt class="py-string">"cannot access path: '%s'"</tt> <tt class="py-op">%</tt> <tt class="py-name">path</tt><tt class="py-op">)</tt> </tt>
3884-<a name="L87"></a><tt class="py-lineno"> 87</tt> <tt class="py-line"> </tt>
3885-<a name="L88"></a><tt class="py-lineno"> 88</tt> <tt class="py-line"> <tt class="py-name">fileList</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> <tt class="py-comment"># result list</tt> </tt>
3886-<a name="L89"></a><tt class="py-lineno"> 89</tt> <tt class="py-line"> <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
3887-<a name="L90"></a><tt class="py-lineno"> 90</tt> <tt class="py-line"> <tt class="py-keyword">for</tt> <tt class="py-name">dir</tt><tt class="py-op">,</tt> <tt class="py-name">subdirs</tt><tt class="py-op">,</tt> <tt class="py-name">files</tt> <tt class="py-keyword">in</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">walk</tt><tt class="py-op">(</tt><tt class="py-name">path</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
3888-<a name="L91"></a><tt class="py-lineno"> 91</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">shellglobs</tt><tt class="py-op">:</tt> </tt>
3889-<a name="L92"></a><tt class="py-lineno"> 92</tt> <tt class="py-line"> <tt class="py-name">matched</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
3890-<a name="L93"></a><tt class="py-lineno"> 93</tt> <tt class="py-line"> <tt class="py-keyword">for</tt> <tt class="py-name">pattern</tt> <tt class="py-keyword">in</tt> <tt class="py-name">shellglobs</tt><tt class="py-op">:</tt> </tt>
3891-<a name="L94"></a><tt class="py-lineno"> 94</tt> <tt class="py-line"> <tt class="py-name">filterf</tt> <tt class="py-op">=</tt> <tt class="py-keyword">lambda</tt> <tt class="py-name">s</tt><tt class="py-op">:</tt> <tt class="py-name">fnmatch</tt><tt class="py-op">.</tt><tt class="py-name">fnmatchcase</tt><tt class="py-op">(</tt><tt class="py-name">s</tt><tt class="py-op">,</tt> <tt class="py-name">pattern</tt><tt class="py-op">)</tt> </tt>
3892-<a name="L95"></a><tt class="py-lineno"> 95</tt> <tt class="py-line"> <tt class="py-name">matched</tt><tt class="py-op">.</tt><tt class="py-name">extend</tt><tt class="py-op">(</tt><tt class="py-name">filter</tt><tt class="py-op">(</tt><tt class="py-name">filterf</tt><tt class="py-op">,</tt> <tt class="py-name">files</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
3893-<a name="L96"></a><tt class="py-lineno"> 96</tt> <tt class="py-line"> <tt class="py-name">fileList</tt><tt class="py-op">.</tt><tt class="py-name">extend</tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-string">'%s%s%s'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">dir</tt><tt class="py-op">,</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">sep</tt><tt class="py-op">,</tt> <tt class="py-name">f</tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt class="py-name">f</tt> <tt class="py-keyword">in</tt> <tt class="py-name">matched</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
3894-<a name="L97"></a><tt class="py-lineno"> 97</tt> <tt class="py-line"> <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
3895-<a name="L98"></a><tt class="py-lineno"> 98</tt> <tt class="py-line"> <tt class="py-name">fileList</tt><tt class="py-op">.</tt><tt class="py-name">extend</tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-string">'%s%s%s'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">dir</tt><tt class="py-op">,</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">sep</tt><tt class="py-op">,</tt> <tt class="py-name">f</tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt class="py-name">f</tt> <tt class="py-keyword">in</tt> <tt class="py-name">files</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
3896-<a name="L99"></a><tt class="py-lineno"> 99</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">relative</tt><tt class="py-op">:</tt> <tt class="py-name">fileList</tt> <tt class="py-op">=</tt> <tt class="py-name">map</tt><tt class="py-op">(</tt><tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">abspath</tt><tt class="py-op">,</tt> <tt class="py-name">fileList</tt><tt class="py-op">)</tt> </tt>
3897-<a name="L100"></a><tt class="py-lineno">100</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">namefs</tt><tt class="py-op">:</tt> </tt>
3898-<a name="L101"></a><tt class="py-lineno">101</tt> <tt class="py-line"> <tt class="py-keyword">for</tt> <tt class="py-name">ff</tt> <tt class="py-keyword">in</tt> <tt class="py-name">namefs</tt><tt class="py-op">:</tt> <tt class="py-name">fileList</tt> <tt class="py-op">=</tt> <tt class="py-name">filter</tt><tt class="py-op">(</tt><tt class="py-name">ff</tt><tt class="py-op">,</tt> <tt class="py-name">fileList</tt><tt class="py-op">)</tt> </tt>
3899-<a name="L102"></a><tt class="py-lineno">102</tt> <tt class="py-line"> <tt class="py-keyword">except</tt> <tt class="py-name">Exception</tt><tt class="py-op">,</tt> <tt class="py-name">e</tt><tt class="py-op">:</tt> <tt class="py-keyword">raise</tt> <tt id="link-1" class="py-name"><a title="scriptutil.ScriptError" class="py-name" href="#" onclick="return doclink('link-1', 'ScriptError', 'link-0');">ScriptError</a></tt><tt class="py-op">(</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">e</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
3900-<a name="L103"></a><tt class="py-lineno">103</tt> <tt class="py-line"> <tt class="py-keyword">return</tt><tt class="py-op">(</tt><tt class="py-name">fileList</tt><tt class="py-op">)</tt> </tt>
3901-</div><a name="L104"></a><tt class="py-lineno">104</tt> <tt class="py-line"> </tt>
3902-<a name="ffindgrep"></a><div id="ffindgrep-def"><a name="L105"></a><tt class="py-lineno">105</tt> <a class="py-toggle" href="#" id="ffindgrep-toggle" onclick="return toggle('ffindgrep');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="scriptutil-module.html#ffindgrep">ffindgrep</a><tt class="py-op">(</tt><tt class="py-param">path</tt><tt class="py-op">,</tt> <tt class="py-param">regexl</tt><tt class="py-op">,</tt> <tt class="py-param">shellglobs</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">namefs</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
3903-<a name="L106"></a><tt class="py-lineno">106</tt> <tt class="py-line"> <tt class="py-param">relative</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">,</tt> <tt class="py-param">linenums</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
3904-</div><div id="ffindgrep-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="ffindgrep-expanded"><a name="L107"></a><tt class="py-lineno">107</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
3905-<a name="L108"></a><tt class="py-lineno">108</tt> <tt class="py-line"><tt class="py-docstring"> Find files in the directory tree starting at 'path' (filtered by</tt> </tt>
3906-<a name="L109"></a><tt class="py-lineno">109</tt> <tt class="py-line"><tt class="py-docstring"> Unix shell-style wildcards ('shellglobs') and/or the functions in</tt> </tt>
3907-<a name="L110"></a><tt class="py-lineno">110</tt> <tt class="py-line"><tt class="py-docstring"> the 'namefs' sequence) and search inside these.</tt> </tt>
3908-<a name="L111"></a><tt class="py-lineno">111</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
3909-<a name="L112"></a><tt class="py-lineno">112</tt> <tt class="py-line"><tt class="py-docstring"> Additionaly, the file content will be filtered by the regular</tt> </tt>
3910-<a name="L113"></a><tt class="py-lineno">113</tt> <tt class="py-line"><tt class="py-docstring"> expressions in the 'regexl' sequence. Each entry in the latter</tt> </tt>
3911-<a name="L114"></a><tt class="py-lineno">114</tt> <tt class="py-line"><tt class="py-docstring"> is a</tt> </tt>
3912-<a name="L115"></a><tt class="py-lineno">115</tt> <tt class="py-line"><tt class="py-docstring"> </tt> </tt>
3913-<a name="L116"></a><tt class="py-lineno">116</tt> <tt class="py-line"><tt class="py-docstring"> - either a string (with the regex definition)</tt> </tt>
3914-<a name="L117"></a><tt class="py-lineno">117</tt> <tt class="py-line"><tt class="py-docstring"> - or a tuple with arguments accepted by re.compile() (the</tt> </tt>
3915-<a name="L118"></a><tt class="py-lineno">118</tt> <tt class="py-line"><tt class="py-docstring"> re.M and re.S flags will have no effect though)</tt> </tt>
3916-<a name="L119"></a><tt class="py-lineno">119</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
3917-<a name="L120"></a><tt class="py-lineno">120</tt> <tt class="py-line"><tt class="py-docstring"> For all the files that pass the file name/content tests the function</tt> </tt>
3918-<a name="L121"></a><tt class="py-lineno">121</tt> <tt class="py-line"><tt class="py-docstring"> returns a dictionary where the</tt> </tt>
3919-<a name="L122"></a><tt class="py-lineno">122</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
3920-<a name="L123"></a><tt class="py-lineno">123</tt> <tt class="py-line"><tt class="py-docstring"> - key is the file name and the</tt> </tt>
3921-<a name="L124"></a><tt class="py-lineno">124</tt> <tt class="py-line"><tt class="py-docstring"> - value is a string with lines filtered by 'regexl'</tt> </tt>
3922-<a name="L125"></a><tt class="py-lineno">125</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
3923-<a name="L126"></a><tt class="py-lineno">126</tt> <tt class="py-line"><tt class="py-docstring"> @type path: string</tt> </tt>
3924-<a name="L127"></a><tt class="py-lineno">127</tt> <tt class="py-line"><tt class="py-docstring"> @param path: starting path of the directory tree to be searched</tt> </tt>
3925-<a name="L128"></a><tt class="py-lineno">128</tt> <tt class="py-line"><tt class="py-docstring"> @type shellglobs: sequence</tt> </tt>
3926-<a name="L129"></a><tt class="py-lineno">129</tt> <tt class="py-line"><tt class="py-docstring"> @param shellglobs: an optional sequence of Unix shell-style wildcards</tt> </tt>
3927-<a name="L130"></a><tt class="py-lineno">130</tt> <tt class="py-line"><tt class="py-docstring"> that are to be applied to the file *names* found</tt> </tt>
3928-<a name="L131"></a><tt class="py-lineno">131</tt> <tt class="py-line"><tt class="py-docstring"> @type namefs: sequence</tt> </tt>
3929-<a name="L132"></a><tt class="py-lineno">132</tt> <tt class="py-line"><tt class="py-docstring"> @param namefs: an optional sequence of functions to be applied to the</tt> </tt>
3930-<a name="L133"></a><tt class="py-lineno">133</tt> <tt class="py-line"><tt class="py-docstring"> file *paths* found</tt> </tt>
3931-<a name="L134"></a><tt class="py-lineno">134</tt> <tt class="py-line"><tt class="py-docstring"> @type relative: bool</tt> </tt>
3932-<a name="L135"></a><tt class="py-lineno">135</tt> <tt class="py-line"><tt class="py-docstring"> @param relative: a boolean flag that determines whether absolute or</tt> </tt>
3933-<a name="L136"></a><tt class="py-lineno">136</tt> <tt class="py-line"><tt class="py-docstring"> relative paths should be returned</tt> </tt>
3934-<a name="L137"></a><tt class="py-lineno">137</tt> <tt class="py-line"><tt class="py-docstring"> @type linenums: bool</tt> </tt>
3935-<a name="L138"></a><tt class="py-lineno">138</tt> <tt class="py-line"><tt class="py-docstring"> @param linenums: turns on line numbers for found files (like grep -n)</tt> </tt>
3936-<a name="L139"></a><tt class="py-lineno">139</tt> <tt class="py-line"><tt class="py-docstring"> @rtype: dict</tt> </tt>
3937-<a name="L140"></a><tt class="py-lineno">140</tt> <tt class="py-line"><tt class="py-docstring"> @return: file name (key) and lines filtered by 'regexl' (value)</tt> </tt>
3938-<a name="L141"></a><tt class="py-lineno">141</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
3939-<a name="L142"></a><tt class="py-lineno">142</tt> <tt class="py-line"> <tt class="py-name">fileList</tt> <tt class="py-op">=</tt> <tt id="link-2" class="py-name" targets="Function scriptutil.ffind()=scriptutil-module.html#ffind"><a title="scriptutil.ffind" class="py-name" href="#" onclick="return doclink('link-2', 'ffind', 'link-2');">ffind</a></tt><tt class="py-op">(</tt><tt class="py-name">path</tt><tt class="py-op">,</tt> <tt class="py-name">shellglobs</tt><tt class="py-op">=</tt><tt class="py-name">shellglobs</tt><tt class="py-op">,</tt> </tt>
3940-<a name="L143"></a><tt class="py-lineno">143</tt> <tt class="py-line"> <tt class="py-name">namefs</tt><tt class="py-op">=</tt><tt class="py-name">namefs</tt><tt class="py-op">,</tt> <tt class="py-name">relative</tt><tt class="py-op">=</tt><tt class="py-name">relative</tt><tt class="py-op">)</tt> </tt>
3941-<a name="L144"></a><tt class="py-lineno">144</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">fileList</tt><tt class="py-op">:</tt> <tt class="py-keyword">return</tt> <tt class="py-name">dict</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
3942-<a name="L145"></a><tt class="py-lineno">145</tt> <tt class="py-line"> </tt>
3943-<a name="L146"></a><tt class="py-lineno">146</tt> <tt class="py-line"> <tt class="py-name">result</tt> <tt class="py-op">=</tt> <tt class="py-name">dict</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
3944-<a name="L147"></a><tt class="py-lineno">147</tt> <tt class="py-line"> </tt>
3945-<a name="L148"></a><tt class="py-lineno">148</tt> <tt class="py-line"> <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
3946-<a name="L149"></a><tt class="py-lineno">149</tt> <tt class="py-line"> <tt class="py-comment"># first compile the regular expressions</tt> </tt>
3947-<a name="L150"></a><tt class="py-lineno">150</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-name">ffuncs</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
3948-<a name="L151"></a><tt class="py-lineno">151</tt> <tt class="py-line"> <tt class="py-keyword">for</tt> <tt class="py-name">redata</tt> <tt class="py-keyword">in</tt> <tt class="py-name">regexl</tt><tt class="py-op">:</tt> </tt>
3949-<a name="L152"></a><tt class="py-lineno">152</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">type</tt><tt class="py-op">(</tt><tt class="py-name">redata</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-name">types</tt><tt class="py-op">.</tt><tt class="py-name">StringType</tt><tt class="py-op">:</tt> </tt>
3950-<a name="L153"></a><tt class="py-lineno">153</tt> <tt class="py-line"> <tt class="py-name">ffuncs</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-name">redata</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">search</tt><tt class="py-op">)</tt> </tt>
3951-<a name="L154"></a><tt class="py-lineno">154</tt> <tt class="py-line"> <tt class="py-keyword">elif</tt> <tt class="py-name">type</tt><tt class="py-op">(</tt><tt class="py-name">redata</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-name">types</tt><tt class="py-op">.</tt><tt class="py-name">TupleType</tt><tt class="py-op">:</tt> </tt>
3952-<a name="L155"></a><tt class="py-lineno">155</tt> <tt class="py-line"> <tt class="py-name">ffuncs</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-op">*</tt><tt class="py-name">redata</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">search</tt><tt class="py-op">)</tt> </tt>
3953-<a name="L156"></a><tt class="py-lineno">156</tt> <tt class="py-line"> <tt class="py-comment"># now grep in the files found</tt> </tt>
3954-<a name="L157"></a><tt class="py-lineno">157</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-keyword">for</tt> <tt class="py-name">file</tt> <tt class="py-keyword">in</tt> <tt class="py-name">fileList</tt><tt class="py-op">:</tt> </tt>
3955-<a name="L158"></a><tt class="py-lineno">158</tt> <tt class="py-line"> <tt class="py-comment"># read file content</tt> </tt>
3956-<a name="L159"></a><tt class="py-lineno">159</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-name">fhandle</tt> <tt class="py-op">=</tt> <tt class="py-name">open</tt><tt class="py-op">(</tt><tt class="py-name">file</tt><tt class="py-op">,</tt> <tt class="py-string">'r'</tt><tt class="py-op">)</tt> </tt>
3957-<a name="L160"></a><tt class="py-lineno">160</tt> <tt class="py-line"> <tt class="py-name">fcontent</tt> <tt class="py-op">=</tt> <tt class="py-name">fhandle</tt><tt class="py-op">.</tt><tt class="py-name">read</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
3958-<a name="L161"></a><tt class="py-lineno">161</tt> <tt class="py-line"> <tt class="py-name">fhandle</tt><tt class="py-op">.</tt><tt class="py-name">close</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
3959-<a name="L162"></a><tt class="py-lineno">162</tt> <tt class="py-line"> <tt class="py-comment"># split file content in lines</tt> </tt>
3960-<a name="L163"></a><tt class="py-lineno">163</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-keyword">if</tt> <tt class="py-name">linenums</tt><tt class="py-op">:</tt> <tt class="py-name">lines</tt> <tt class="py-op">=</tt> <tt class="py-name">zip</tt><tt class="py-op">(</tt><tt class="py-name">itertools</tt><tt class="py-op">.</tt><tt class="py-name">count</tt><tt class="py-op">(</tt><tt class="py-number">1</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">fcontent</tt><tt class="py-op">.</tt><tt class="py-name">splitlines</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
3961-<a name="L164"></a><tt class="py-lineno">164</tt> <tt class="py-line"> <tt class="py-keyword">else</tt><tt class="py-op">:</tt> <tt class="py-name">lines</tt> <tt class="py-op">=</tt> <tt class="py-name">fcontent</tt><tt class="py-op">.</tt><tt class="py-name">splitlines</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
3962-<a name="L165"></a><tt class="py-lineno">165</tt> <tt class="py-line"> <tt class="py-keyword">for</tt> <tt class="py-name">ff</tt> <tt class="py-keyword">in</tt> <tt class="py-name">ffuncs</tt><tt class="py-op">:</tt> </tt>
3963-<a name="L166"></a><tt class="py-lineno">166</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">linenums</tt><tt class="py-op">:</tt> <tt class="py-name">lines</tt> <tt class="py-op">=</tt> <tt class="py-name">filter</tt><tt class="py-op">(</tt><tt class="py-keyword">lambda</tt> <tt class="py-name">t</tt><tt class="py-op">:</tt> <tt class="py-name">ff</tt><tt class="py-op">(</tt><tt class="py-name">t</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">lines</tt><tt class="py-op">)</tt> </tt>
3964-<a name="L167"></a><tt class="py-lineno">167</tt> <tt class="py-line"> <tt class="py-keyword">else</tt><tt class="py-op">:</tt> <tt class="py-name">lines</tt> <tt class="py-op">=</tt> <tt class="py-name">filter</tt><tt class="py-op">(</tt><tt class="py-name">ff</tt><tt class="py-op">,</tt> <tt class="py-name">lines</tt><tt class="py-op">)</tt> </tt>
3965-<a name="L168"></a><tt class="py-lineno">168</tt> <tt class="py-line"> <tt class="py-comment"># there's no point in applying the remaining regular</tt> </tt>
3966-<a name="L169"></a><tt class="py-lineno">169</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-comment"># expressions if we don't have any matching lines any more</tt> </tt>
3967-<a name="L170"></a><tt class="py-lineno">170</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">lines</tt><tt class="py-op">:</tt> <tt class="py-keyword">break</tt> </tt>
3968-<a name="L171"></a><tt class="py-lineno">171</tt> <tt class="py-line"> <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
3969-<a name="L172"></a><tt class="py-lineno">172</tt> <tt class="py-line"> <tt class="py-comment"># the loop terminated normally; add this file to the</tt> </tt>
3970-<a name="L173"></a><tt class="py-lineno">173</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-comment"># result set if there are any lines that matched</tt> </tt>
3971-<a name="L174"></a><tt class="py-lineno">174</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-keyword">if</tt> <tt class="py-name">lines</tt><tt class="py-op">:</tt> </tt>
3972-<a name="L175"></a><tt class="py-lineno">175</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">linenums</tt><tt class="py-op">:</tt> </tt>
3973-<a name="L176"></a><tt class="py-lineno">176</tt> <tt class="py-line"> <tt class="py-name">result</tt><tt class="py-op">[</tt><tt class="py-name">file</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-string">'\n'</tt><tt class="py-op">.</tt><tt class="py-name">join</tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-string">"%d:%s"</tt> <tt class="py-op">%</tt> <tt class="py-name">t</tt> <tt class="py-keyword">for</tt> <tt class="py-name">t</tt> <tt class="py-keyword">in</tt> <tt class="py-name">lines</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
3974-<a name="L177"></a><tt class="py-lineno">177</tt> <tt class="py-line"> <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
3975-<a name="L178"></a><tt class="py-lineno">178</tt> <tt class="py-line"> <tt class="py-name">result</tt><tt class="py-op">[</tt><tt class="py-name">file</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-string">'\n'</tt><tt class="py-op">.</tt><tt class="py-name">join</tt><tt class="py-op">(</tt><tt class="py-name">map</tt><tt class="py-op">(</tt><tt class="py-name">str</tt><tt class="py-op">,</tt> <tt class="py-name">lines</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
3976-<a name="L179"></a><tt class="py-lineno">179</tt> <tt class="py-line"> <tt class="py-keyword">except</tt> <tt class="py-name">Exception</tt><tt class="py-op">,</tt> <tt class="py-name">e</tt><tt class="py-op">:</tt> <tt class="py-keyword">raise</tt> <tt id="link-3" class="py-name"><a title="scriptutil.ScriptError" class="py-name" href="#" onclick="return doclink('link-3', 'ScriptError', 'link-0');">ScriptError</a></tt><tt class="py-op">(</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">e</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
3977-<a name="L180"></a><tt class="py-lineno">180</tt> <tt class="py-line"> <tt class="py-keyword">return</tt><tt class="py-op">(</tt><tt class="py-name">result</tt><tt class="py-op">)</tt> </tt>
3978-</div><a name="L181"></a><tt class="py-lineno">181</tt> <tt class="py-line"> </tt>
3979-<a name="freplace"></a><div id="freplace-def"><a name="L182"></a><tt class="py-lineno">182</tt> <a class="py-toggle" href="#" id="freplace-toggle" onclick="return toggle('freplace');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="scriptutil-module.html#freplace">freplace</a><tt class="py-op">(</tt><tt class="py-param">path</tt><tt class="py-op">,</tt> <tt class="py-param">regexl</tt><tt class="py-op">,</tt> <tt class="py-param">shellglobs</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">namefs</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">bext</tt><tt class="py-op">=</tt><tt class="py-string">'.bak'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
3980-</div><div id="freplace-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="freplace-expanded"><a name="L183"></a><tt class="py-lineno">183</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
3981-<a name="L184"></a><tt class="py-lineno">184</tt> <tt class="py-line"><tt class="py-docstring"> Find files in the directory tree starting at 'path' (filtered by</tt> </tt>
3982-<a name="L185"></a><tt class="py-lineno">185</tt> <tt class="py-line"><tt class="py-docstring"> Unix shell-style wildcards ('shellglobs') and/or the functions in</tt> </tt>
3983-<a name="L186"></a><tt class="py-lineno">186</tt> <tt class="py-line"><tt class="py-docstring"> the 'namefs' sequence) and perform an in-place search/replace</tt> </tt>
3984-<a name="L187"></a><tt class="py-lineno">187</tt> <tt class="py-line"><tt class="py-docstring"> operation on these.</tt> </tt>
3985-<a name="L188"></a><tt class="py-lineno">188</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
3986-<a name="L189"></a><tt class="py-lineno">189</tt> <tt class="py-line"><tt class="py-docstring"> Additionally, an in-place search/replace operation is performed</tt> </tt>
3987-<a name="L190"></a><tt class="py-lineno">190</tt> <tt class="py-line"><tt class="py-docstring"> on the content of all the files (whose names passed the tests)</tt> </tt>
3988-<a name="L191"></a><tt class="py-lineno">191</tt> <tt class="py-line"><tt class="py-docstring"> using the regular expressions in 'regexl'.</tt> </tt>
3989-<a name="L192"></a><tt class="py-lineno">192</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
3990-<a name="L193"></a><tt class="py-lineno">193</tt> <tt class="py-line"><tt class="py-docstring"> Please note: 'regexl' is a sequence of 3-tuples, each having the</tt> </tt>
3991-<a name="L194"></a><tt class="py-lineno">194</tt> <tt class="py-line"><tt class="py-docstring"> following elements:</tt> </tt>
3992-<a name="L195"></a><tt class="py-lineno">195</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
3993-<a name="L196"></a><tt class="py-lineno">196</tt> <tt class="py-line"><tt class="py-docstring"> - search string (Python regex syntax)</tt> </tt>
3994-<a name="L197"></a><tt class="py-lineno">197</tt> <tt class="py-line"><tt class="py-docstring"> - replace string (Python regex syntax)</tt> </tt>
3995-<a name="L198"></a><tt class="py-lineno">198</tt> <tt class="py-line"><tt class="py-docstring"> - regex flags or 'None' (re.compile syntax)</tt> </tt>
3996-<a name="L199"></a><tt class="py-lineno">199</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
3997-<a name="L200"></a><tt class="py-lineno">200</tt> <tt class="py-line"><tt class="py-docstring"> Copies of the modified files are saved in backup files using the</tt> </tt>
3998-<a name="L201"></a><tt class="py-lineno">201</tt> <tt class="py-line"><tt class="py-docstring"> extension specified in 'bext'.</tt> </tt>
3999-<a name="L202"></a><tt class="py-lineno">202</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
4000-<a name="L203"></a><tt class="py-lineno">203</tt> <tt class="py-line"><tt class="py-docstring"> @type path: string</tt> </tt>
4001-<a name="L204"></a><tt class="py-lineno">204</tt> <tt class="py-line"><tt class="py-docstring"> @param path: starting path of the directory tree to be searched</tt> </tt>
4002-<a name="L205"></a><tt class="py-lineno">205</tt> <tt class="py-line"><tt class="py-docstring"> @type shellglobs: sequence</tt> </tt>
4003-<a name="L206"></a><tt class="py-lineno">206</tt> <tt class="py-line"><tt class="py-docstring"> @param shellglobs: an optional sequence of Unix shell-style wildcards</tt> </tt>
4004-<a name="L207"></a><tt class="py-lineno">207</tt> <tt class="py-line"><tt class="py-docstring"> that are to be applied to the file *names* found</tt> </tt>
4005-<a name="L208"></a><tt class="py-lineno">208</tt> <tt class="py-line"><tt class="py-docstring"> @type namefs: sequence</tt> </tt>
4006-<a name="L209"></a><tt class="py-lineno">209</tt> <tt class="py-line"><tt class="py-docstring"> @param namefs: an optional sequence of functions to be applied to the</tt> </tt>
4007-<a name="L210"></a><tt class="py-lineno">210</tt> <tt class="py-line"><tt class="py-docstring"> file *paths* found</tt> </tt>
4008-<a name="L211"></a><tt class="py-lineno">211</tt> <tt class="py-line"><tt class="py-docstring"> @rtype: number</tt> </tt>
4009-<a name="L212"></a><tt class="py-lineno">212</tt> <tt class="py-line"><tt class="py-docstring"> @return: total number of files modified</tt> </tt>
4010-<a name="L213"></a><tt class="py-lineno">213</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
4011-<a name="L214"></a><tt class="py-lineno">214</tt> <tt class="py-line"> <tt class="py-name">fileList</tt> <tt class="py-op">=</tt> <tt id="link-4" class="py-name"><a title="scriptutil.ffind" class="py-name" href="#" onclick="return doclink('link-4', 'ffind', 'link-2');">ffind</a></tt><tt class="py-op">(</tt><tt class="py-name">path</tt><tt class="py-op">,</tt> <tt class="py-name">shellglobs</tt><tt class="py-op">=</tt><tt class="py-name">shellglobs</tt><tt class="py-op">,</tt> <tt class="py-name">namefs</tt><tt class="py-op">=</tt><tt class="py-name">namefs</tt><tt class="py-op">)</tt> </tt>
4012-<a name="L215"></a><tt class="py-lineno">215</tt> <tt class="py-line"> </tt>
4013-<a name="L216"></a><tt class="py-lineno">216</tt> <tt class="py-line"> <tt class="py-comment"># return if no files found</tt> </tt>
4014-<a name="L217"></a><tt class="py-lineno">217</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">fileList</tt><tt class="py-op">:</tt> <tt class="py-keyword">return</tt> <tt class="py-number">0</tt> </tt>
4015-<a name="L218"></a><tt class="py-lineno">218</tt> <tt class="py-line"> </tt>
4016-<a name="L219"></a><tt class="py-lineno">219</tt> <tt class="py-line"> <tt class="py-name">filesChanged</tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt>
4017-<a name="L220"></a><tt class="py-lineno">220</tt> <tt class="py-line"> </tt>
4018-<a name="L221"></a><tt class="py-lineno">221</tt> <tt class="py-line"> <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
4019-<a name="L222"></a><tt class="py-lineno">222</tt> <tt class="py-line"> <tt class="py-name">cffl</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
4020-<a name="L223"></a><tt class="py-lineno">223</tt> <tt class="py-line"> <tt class="py-keyword">for</tt> <tt class="py-name">searchs</tt><tt class="py-op">,</tt> <tt class="py-name">replaces</tt><tt class="py-op">,</tt> <tt class="py-name">reflags</tt> <tt class="py-keyword">in</tt> <tt class="py-name">regexl</tt><tt class="py-op">:</tt> </tt>
4021-<a name="L224"></a><tt class="py-lineno">224</tt> <tt class="py-line"> <tt class="py-comment"># prepare the required regex objects, check whether we need</tt> </tt>
4022-<a name="L225"></a><tt class="py-lineno">225</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-comment"># to pass any regex compilation flags</tt> </tt>
4023-<a name="L226"></a><tt class="py-lineno">226</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-keyword">if</tt> <tt class="py-name">reflags</tt> <tt class="py-keyword">is</tt> <tt class="py-keyword">not</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> <tt class="py-name">regex</tt> <tt class="py-op">=</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-name">searchs</tt><tt class="py-op">,</tt> <tt class="py-name">reflags</tt><tt class="py-op">)</tt> </tt>
4024-<a name="L227"></a><tt class="py-lineno">227</tt> <tt class="py-line"> <tt class="py-keyword">else</tt><tt class="py-op">:</tt> <tt class="py-name">regex</tt> <tt class="py-op">=</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-name">searchs</tt><tt class="py-op">)</tt> </tt>
4025-<a name="L228"></a><tt class="py-lineno">228</tt> <tt class="py-line"> <tt class="py-name">cffl</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-op">(</tt><tt class="py-name">regex</tt><tt class="py-op">.</tt><tt class="py-name">subn</tt><tt class="py-op">,</tt> <tt class="py-name">replaces</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
4026-<a name="L229"></a><tt class="py-lineno">229</tt> <tt class="py-line"> <tt class="py-keyword">for</tt> <tt class="py-name">file</tt> <tt class="py-keyword">in</tt> <tt class="py-name">fileList</tt><tt class="py-op">:</tt> </tt>
4027-<a name="L230"></a><tt class="py-lineno">230</tt> <tt class="py-line"> <tt class="py-comment"># read file content</tt> </tt>
4028-<a name="L231"></a><tt class="py-lineno">231</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-name">fhandle</tt> <tt class="py-op">=</tt> <tt class="py-name">open</tt><tt class="py-op">(</tt><tt class="py-name">file</tt><tt class="py-op">,</tt> <tt class="py-string">'r'</tt><tt class="py-op">)</tt> </tt>
4029-<a name="L232"></a><tt class="py-lineno">232</tt> <tt class="py-line"> <tt class="py-name">text</tt> <tt class="py-op">=</tt> <tt class="py-name">fhandle</tt><tt class="py-op">.</tt><tt class="py-name">read</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
4030-<a name="L233"></a><tt class="py-lineno">233</tt> <tt class="py-line"> <tt class="py-name">fhandle</tt><tt class="py-op">.</tt><tt class="py-name">close</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
4031-<a name="L234"></a><tt class="py-lineno">234</tt> <tt class="py-line"> <tt class="py-name">substitutions</tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt>
4032-<a name="L235"></a><tt class="py-lineno">235</tt> <tt class="py-line"> <tt class="py-comment"># unpack the subn() function and the replace string</tt> </tt>
4033-<a name="L236"></a><tt class="py-lineno">236</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-keyword">for</tt> <tt class="py-name">subnfunc</tt><tt class="py-op">,</tt> <tt class="py-name">replaces</tt> <tt class="py-keyword">in</tt> <tt class="py-name">cffl</tt><tt class="py-op">:</tt> </tt>
4034-<a name="L237"></a><tt class="py-lineno">237</tt> <tt class="py-line"> <tt class="py-name">text</tt><tt class="py-op">,</tt> <tt class="py-name">numOfChanges</tt> <tt class="py-op">=</tt> <tt class="py-name">subnfunc</tt><tt class="py-op">(</tt><tt class="py-name">replaces</tt><tt class="py-op">,</tt> <tt class="py-name">text</tt><tt class="py-op">)</tt> </tt>
4035-<a name="L238"></a><tt class="py-lineno">238</tt> <tt class="py-line"> <tt class="py-name">substitutions</tt> <tt class="py-op">+=</tt> <tt class="py-name">numOfChanges</tt> </tt>
4036-<a name="L239"></a><tt class="py-lineno">239</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">substitutions</tt><tt class="py-op">:</tt> </tt>
4037-<a name="L240"></a><tt class="py-lineno">240</tt> <tt class="py-line"> <tt class="py-comment"># first move away the original file</tt> </tt>
4038-<a name="L241"></a><tt class="py-lineno">241</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-name">bakFileName</tt> <tt class="py-op">=</tt> <tt class="py-string">'%s%s'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">file</tt><tt class="py-op">,</tt> <tt class="py-name">bext</tt><tt class="py-op">)</tt> </tt>
4039-<a name="L242"></a><tt class="py-lineno">242</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">exists</tt><tt class="py-op">(</tt><tt class="py-name">bakFileName</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">unlink</tt><tt class="py-op">(</tt><tt class="py-name">bakFileName</tt><tt class="py-op">)</tt> </tt>
4040-<a name="L243"></a><tt class="py-lineno">243</tt> <tt class="py-line"> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">rename</tt><tt class="py-op">(</tt><tt class="py-name">file</tt><tt class="py-op">,</tt> <tt class="py-name">bakFileName</tt><tt class="py-op">)</tt> </tt>
4041-<a name="L244"></a><tt class="py-lineno">244</tt> <tt class="py-line"> <tt class="py-comment"># now write the new file content</tt> </tt>
4042-<a name="L245"></a><tt class="py-lineno">245</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-name">fhandle</tt> <tt class="py-op">=</tt> <tt class="py-name">open</tt><tt class="py-op">(</tt><tt class="py-name">file</tt><tt class="py-op">,</tt> <tt class="py-string">'w'</tt><tt class="py-op">)</tt> </tt>
4043-<a name="L246"></a><tt class="py-lineno">246</tt> <tt class="py-line"> <tt class="py-name">fhandle</tt><tt class="py-op">.</tt><tt class="py-name">write</tt><tt class="py-op">(</tt><tt class="py-name">text</tt><tt class="py-op">)</tt> </tt>
4044-<a name="L247"></a><tt class="py-lineno">247</tt> <tt class="py-line"> <tt class="py-name">fhandle</tt><tt class="py-op">.</tt><tt class="py-name">close</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
4045-<a name="L248"></a><tt class="py-lineno">248</tt> <tt class="py-line"> <tt class="py-name">filesChanged</tt> <tt class="py-op">+=</tt> <tt class="py-number">1</tt> </tt>
4046-<a name="L249"></a><tt class="py-lineno">249</tt> <tt class="py-line"> <tt class="py-keyword">except</tt> <tt class="py-name">Exception</tt><tt class="py-op">,</tt> <tt class="py-name">e</tt><tt class="py-op">:</tt> <tt class="py-keyword">raise</tt> <tt id="link-5" class="py-name"><a title="scriptutil.ScriptError" class="py-name" href="#" onclick="return doclink('link-5', 'ScriptError', 'link-0');">ScriptError</a></tt><tt class="py-op">(</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">e</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
4047-<a name="L250"></a><tt class="py-lineno">250</tt> <tt class="py-line"> </tt>
4048-<a name="L251"></a><tt class="py-lineno">251</tt> <tt class="py-line"> <tt class="py-comment"># Returns the number of files that had some of their content changed</tt> </tt>
4049-<a name="L252"></a><tt class="py-lineno">252</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-keyword">return</tt><tt class="py-op">(</tt><tt class="py-name">filesChanged</tt><tt class="py-op">)</tt> </tt>
4050-</div><a name="L253"></a><tt class="py-lineno">253</tt> <tt class="py-line"> </tt>
4051-<a name="printr"></a><div id="printr-def"><a name="L254"></a><tt class="py-lineno">254</tt> <a class="py-toggle" href="#" id="printr-toggle" onclick="return toggle('printr');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="scriptutil-module.html#printr">printr</a><tt class="py-op">(</tt><tt class="py-param">results</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
4052-</div><div id="printr-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="printr-expanded"><a name="L255"></a><tt class="py-lineno">255</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
4053-<a name="L256"></a><tt class="py-lineno">256</tt> <tt class="py-line"><tt class="py-docstring"> Print the results of the ffind()/ffindgrep() functions.</tt> </tt>
4054-<a name="L257"></a><tt class="py-lineno">257</tt> <tt class="py-line"><tt class="py-docstring"> </tt> </tt>
4055-<a name="L258"></a><tt class="py-lineno">258</tt> <tt class="py-line"><tt class="py-docstring"> The output format is similar to the one used by the UNIX find utility.</tt> </tt>
4056-<a name="L259"></a><tt class="py-lineno">259</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
4057-<a name="L260"></a><tt class="py-lineno">260</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">type</tt><tt class="py-op">(</tt><tt class="py-name">results</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-name">types</tt><tt class="py-op">.</tt><tt class="py-name">DictType</tt><tt class="py-op">:</tt> </tt>
4058-<a name="L261"></a><tt class="py-lineno">261</tt> <tt class="py-line"> <tt class="py-keyword">for</tt> <tt class="py-name">f</tt> <tt class="py-keyword">in</tt> <tt class="py-name">sorted</tt><tt class="py-op">(</tt><tt class="py-name">results</tt><tt class="py-op">.</tt><tt class="py-name">keys</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
4059-<a name="L262"></a><tt class="py-lineno">262</tt> <tt class="py-line"> <tt class="py-name">sys</tt><tt class="py-op">.</tt><tt class="py-name">stdout</tt><tt class="py-op">.</tt><tt class="py-name">write</tt><tt class="py-op">(</tt><tt class="py-string">"%s\n%s\n"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">results</tt><tt class="py-op">[</tt><tt class="py-name">f</tt><tt class="py-op">]</tt><tt class="py-op">,</tt><tt class="py-name">f</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
4060-<a name="L263"></a><tt class="py-lineno">263</tt> <tt class="py-line"> <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
4061-<a name="L264"></a><tt class="py-lineno">264</tt> <tt class="py-line"> <tt class="py-keyword">for</tt> <tt class="py-name">f</tt> <tt class="py-keyword">in</tt> <tt class="py-name">sorted</tt><tt class="py-op">(</tt><tt class="py-name">results</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
4062-<a name="L265"></a><tt class="py-lineno">265</tt> <tt class="py-line"> <tt class="py-name">sys</tt><tt class="py-op">.</tt><tt class="py-name">stdout</tt><tt class="py-op">.</tt><tt class="py-name">write</tt><tt class="py-op">(</tt><tt class="py-string">"%s\n"</tt> <tt class="py-op">%</tt> <tt class="py-name">f</tt><tt class="py-op">)</tt> </tt>
4063-</div><a name="L266"></a><tt class="py-lineno">266</tt> <tt class="py-line"> </tt>
4064-<a name="L267"></a><tt class="py-lineno">267</tt> <tt class="py-line"><tt class="py-keyword">if</tt> <tt class="py-name">__name__</tt> <tt class="py-op">==</tt> <tt class="py-string">'__main__'</tt><tt class="py-op">:</tt> </tt>
4065-<a name="L268"></a><tt class="py-lineno">268</tt> <tt class="py-line"> <tt class="py-keyword">pass</tt> </tt>
4066-<a name="L269"></a><tt class="py-lineno">269</tt> <tt class="py-line"> </tt><script type="text/javascript">
4067-<!--
4068-expandto(location.href);
4069-// -->
4070-</script>
4071-</pre>
4072-<br />
4073-<!-- ==================== NAVIGATION BAR ==================== -->
4074-<table class="navbar" border="0" width="100%" cellpadding="0"
4075- bgcolor="#a0c0ff" cellspacing="0">
4076- <tr valign="middle">
4077- <!-- Home link -->
4078- <th bgcolor="#70b0f0" class="navbar-select"
4079- >&nbsp;&nbsp;&nbsp;Home&nbsp;&nbsp;&nbsp;</th>
4080-
4081- <!-- Tree link -->
4082- <th>&nbsp;&nbsp;&nbsp;<a
4083- href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
4084-
4085- <!-- Index link -->
4086- <th>&nbsp;&nbsp;&nbsp;<a
4087- href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
4088-
4089- <!-- Help link -->
4090- <th>&nbsp;&nbsp;&nbsp;<a
4091- href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
4092-
4093- <!-- Project homepage -->
4094- <th class="navbar" align="right" width="100%">
4095- <table border="0" cellpadding="0" cellspacing="0">
4096- <tr><th class="navbar" align="center"
4097- ><a class="navbar" target="_top" href="http://hrnjad.net/src/scriptutil">Module scriptutil</a></th>
4098- </tr></table></th>
4099- </tr>
4100-</table>
4101-<table border="0" cellpadding="0" cellspacing="0" width="100%%">
4102- <tr>
4103- <td align="left" class="footer">
4104- Generated by Epydoc 3.0beta1 on Thu May 22 18:10:51 2008
4105- </td>
4106- <td align="right" class="footer">
4107- <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
4108- </td>
4109- </tr>
4110-</table>
4111-
4112-<script type="text/javascript">
4113- <!--
4114- // Private objects are initially displayed (because if
4115- // javascript is turned off then we want them to be
4116- // visible); but by default, we want to hide them. So hide
4117- // them unless we have a cookie that says to show them.
4118- checkCookie()
4119- // -->
4120-</script>
4121-
4122-</body>
4123-</html>
4124
4125=== removed file 'doc/html/scriptutil.ScriptError-class.html'
4126--- doc/html/scriptutil.ScriptError-class.html 2009-12-26 20:49:38 +0000
4127+++ doc/html/scriptutil.ScriptError-class.html 1970-01-01 00:00:00 +0000
4128@@ -1,197 +0,0 @@
4129-<?xml version="1.0" encoding="ascii"?>
4130-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4131- "DTD/xhtml1-transitional.dtd">
4132-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4133-<head>
4134- <title>scriptutil.ScriptError</title>
4135- <link rel="stylesheet" href="epydoc.css" type="text/css" />
4136- <script type="text/javascript" src="epydoc.js"></script>
4137-</head>
4138-
4139-<body bgcolor="white" text="black" link="blue" vlink="#204080"
4140- alink="#204080">
4141-<!-- ==================== NAVIGATION BAR ==================== -->
4142-<table class="navbar" border="0" width="100%" cellpadding="0"
4143- bgcolor="#a0c0ff" cellspacing="0">
4144- <tr valign="middle">
4145- <!-- Home link -->
4146- <th>&nbsp;&nbsp;&nbsp;<a
4147- href="scriptutil-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
4148-
4149- <!-- Tree link -->
4150- <th>&nbsp;&nbsp;&nbsp;<a
4151- href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
4152-
4153- <!-- Index link -->
4154- <th>&nbsp;&nbsp;&nbsp;<a
4155- href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
4156-
4157- <!-- Help link -->
4158- <th>&nbsp;&nbsp;&nbsp;<a
4159- href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
4160-
4161- <!-- Project homepage -->
4162- <th class="navbar" align="right" width="100%">
4163- <table border="0" cellpadding="0" cellspacing="0">
4164- <tr><th class="navbar" align="center"
4165- ><a class="navbar" target="_top" href="http://hrnjad.net/src/scriptutil">Module scriptutil</a></th>
4166- </tr></table></th>
4167- </tr>
4168-</table>
4169-<table width="100%" cellpadding="0" cellspacing="0">
4170- <tr valign="top">
4171- <td width="100%">
4172- <span class="breadcrumbs">
4173- <a href="scriptutil-module.html">Script&nbsp;scriptutil</a> ::
4174- Class&nbsp;ScriptError
4175- </span>
4176- </td>
4177- <td>
4178- <table cellpadding="0" cellspacing="0">
4179- <!-- hide/show private -->
4180- <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
4181- onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
4182- <tr><td align="right"><span class="options"
4183- >[<a href="frames.html" target="_top">frames</a
4184- >]&nbsp;|&nbsp;<a href="scriptutil.ScriptError-class.html"
4185- target="_top">no&nbsp;frames</a>]</span></td></tr>
4186- </table>
4187- </td>
4188- </tr>
4189-</table>
4190-<!-- ==================== CLASS DESCRIPTION ==================== -->
4191-<h1 class="epydoc">Class ScriptError</h1><span class="codelink"><a href="scriptutil-pysrc.html#ScriptError">source&nbsp;code</a></span><br /><br />
4192-<pre class="base-tree">
4193- object --+
4194- |
4195-exceptions.BaseException --+
4196- |
4197- exceptions.Exception --+
4198- |
4199- <strong class="uidshort">ScriptError</strong>
4200-</pre>
4201-
4202-<hr />
4203-The exception raised in case of failures.<br /><br />
4204-
4205-<!-- ==================== INSTANCE METHODS ==================== -->
4206-<a name="section-InstanceMethods"></a>
4207-<table class="summary" border="1" cellpadding="3"
4208- cellspacing="0" width="100%" bgcolor="white">
4209-<tr bgcolor="#70b0f0" class="table-header">
4210- <td colspan="2" class="table-header">
4211- <table border="0" cellpadding="0" cellspacing="0" width="100%">
4212- <tr valign="top">
4213- <td align="left"><span class="table-header">Instance Methods</span></td>
4214- <td align="right" valign="top"
4215- ><span class="options">[<a href="#section-InstanceMethods"
4216- class="privatelink" onclick="toggle_private();"
4217- >hide private</a>]</span></td>
4218- </tr>
4219- </table>
4220- </td>
4221-</tr>
4222- <tr>
4223- <td colspan="2" class="summary">
4224- <p class="indent-wrapped-lines"><b>Inherited from <code>exceptions.Exception</code></b>:
4225- <code>__init__</code>,
4226- <code>__new__</code>
4227- </p>
4228- <p class="indent-wrapped-lines"><b>Inherited from <code>exceptions.BaseException</code></b>:
4229- <code>__delattr__</code>,
4230- <code>__getattribute__</code>,
4231- <code>__getitem__</code>,
4232- <code>__getslice__</code>,
4233- <code>__reduce__</code>,
4234- <code>__repr__</code>,
4235- <code>__setattr__</code>,
4236- <code>__setstate__</code>,
4237- <code>__str__</code>
4238- </p>
4239- <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
4240- <code>__hash__</code>,
4241- <code>__reduce_ex__</code>
4242- </p>
4243- </td>
4244- </tr>
4245-</table>
4246-<!-- ==================== PROPERTIES ==================== -->
4247-<a name="section-Properties"></a>
4248-<table class="summary" border="1" cellpadding="3"
4249- cellspacing="0" width="100%" bgcolor="white">
4250-<tr bgcolor="#70b0f0" class="table-header">
4251- <td colspan="2" class="table-header">
4252- <table border="0" cellpadding="0" cellspacing="0" width="100%">
4253- <tr valign="top">
4254- <td align="left"><span class="table-header">Properties</span></td>
4255- <td align="right" valign="top"
4256- ><span class="options">[<a href="#section-Properties"
4257- class="privatelink" onclick="toggle_private();"
4258- >hide private</a>]</span></td>
4259- </tr>
4260- </table>
4261- </td>
4262-</tr>
4263- <tr>
4264- <td colspan="2" class="summary">
4265- <p class="indent-wrapped-lines"><b>Inherited from <code>exceptions.BaseException</code></b>:
4266- <code>args</code>,
4267- <code>message</code>
4268- </p>
4269- <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
4270- <code>__class__</code>
4271- </p>
4272- </td>
4273- </tr>
4274-</table>
4275-<!-- ==================== NAVIGATION BAR ==================== -->
4276-<table class="navbar" border="0" width="100%" cellpadding="0"
4277- bgcolor="#a0c0ff" cellspacing="0">
4278- <tr valign="middle">
4279- <!-- Home link -->
4280- <th>&nbsp;&nbsp;&nbsp;<a
4281- href="scriptutil-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
4282-
4283- <!-- Tree link -->
4284- <th>&nbsp;&nbsp;&nbsp;<a
4285- href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
4286-
4287- <!-- Index link -->
4288- <th>&nbsp;&nbsp;&nbsp;<a
4289- href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
4290-
4291- <!-- Help link -->
4292- <th>&nbsp;&nbsp;&nbsp;<a
4293- href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
4294-
4295- <!-- Project homepage -->
4296- <th class="navbar" align="right" width="100%">
4297- <table border="0" cellpadding="0" cellspacing="0">
4298- <tr><th class="navbar" align="center"
4299- ><a class="navbar" target="_top" href="http://hrnjad.net/src/scriptutil">Module scriptutil</a></th>
4300- </tr></table></th>
4301- </tr>
4302-</table>
4303-<table border="0" cellpadding="0" cellspacing="0" width="100%%">
4304- <tr>
4305- <td align="left" class="footer">
4306- Generated by Epydoc 3.0beta1 on Thu May 22 18:10:51 2008
4307- </td>
4308- <td align="right" class="footer">
4309- <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
4310- </td>
4311- </tr>
4312-</table>
4313-
4314-<script type="text/javascript">
4315- <!--
4316- // Private objects are initially displayed (because if
4317- // javascript is turned off then we want them to be
4318- // visible); but by default, we want to hide them. So hide
4319- // them unless we have a cookie that says to show them.
4320- checkCookie()
4321- // -->
4322-</script>
4323-
4324-</body>
4325-</html>
4326
4327=== added file 'doc/html/scriptutil.find-module.html'
4328--- doc/html/scriptutil.find-module.html 1970-01-01 00:00:00 +0000
4329+++ doc/html/scriptutil.find-module.html 2009-12-26 22:06:14 +0000
4330@@ -0,0 +1,494 @@
4331+<?xml version="1.0" encoding="ascii"?>
4332+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4333+ "DTD/xhtml1-transitional.dtd">
4334+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4335+<head>
4336+ <title>scriptutil.find</title>
4337+ <link rel="stylesheet" href="epydoc.css" type="text/css" />
4338+ <script type="text/javascript" src="epydoc.js"></script>
4339+</head>
4340+
4341+<body bgcolor="white" text="black" link="blue" vlink="#204080"
4342+ alink="#204080">
4343+<!-- ==================== NAVIGATION BAR ==================== -->
4344+<table class="navbar" border="0" width="100%" cellpadding="0"
4345+ bgcolor="#a0c0ff" cellspacing="0">
4346+ <tr valign="middle">
4347+ <!-- Home link -->
4348+ <th>&nbsp;&nbsp;&nbsp;<a
4349+ href="scriptutil-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
4350+
4351+ <!-- Tree link -->
4352+ <th>&nbsp;&nbsp;&nbsp;<a
4353+ href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
4354+
4355+ <!-- Index link -->
4356+ <th>&nbsp;&nbsp;&nbsp;<a
4357+ href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
4358+
4359+ <!-- Help link -->
4360+ <th>&nbsp;&nbsp;&nbsp;<a
4361+ href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
4362+
4363+ <!-- Project homepage -->
4364+ <th class="navbar" align="right" width="100%">
4365+ <table border="0" cellpadding="0" cellspacing="0">
4366+ <tr><th class="navbar" align="center"
4367+ ><a class="navbar" target="_top" href="https://launchpad.net/py-script">Project Homepage</a></th>
4368+ </tr></table></th>
4369+ </tr>
4370+</table>
4371+<table width="100%" cellpadding="0" cellspacing="0">
4372+ <tr valign="top">
4373+ <td width="100%">
4374+ <span class="breadcrumbs">
4375+ <a href="scriptutil-module.html">Package&nbsp;scriptutil</a> ::
4376+ Script&nbsp;find
4377+ </span>
4378+ </td>
4379+ <td>
4380+ <table cellpadding="0" cellspacing="0">
4381+ <!-- hide/show private -->
4382+ <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
4383+ onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
4384+ <tr><td align="right"><span class="options"
4385+ >[<a href="frames.html" target="_top">frames</a
4386+ >]&nbsp;|&nbsp;<a href="scriptutil.find-module.html"
4387+ target="_top">no&nbsp;frames</a>]</span></td></tr>
4388+ </table>
4389+ </td>
4390+ </tr>
4391+</table>
4392+<!-- ==================== MODULE DESCRIPTION ==================== -->
4393+<h1 class="epydoc">Module find</h1><p class="nomargin-top"><span class="codelink"><a href="scriptutil.find-pysrc.html">source&nbsp;code</a></span></p>
4394+<p>Functions commonly used in shell scripting:</p>
4395+ <ul>
4396+ <li>
4397+ find() : finds files in a directory tree
4398+ </li>
4399+ <li>
4400+ grep(): finds files in a directory tree and matches their content to
4401+ regular expressions
4402+ </li>
4403+ <li>
4404+ replace() : in-place search/replace of files in a directory tree with
4405+ regular expressions
4406+ </li>
4407+ <li>
4408+ pprint() : prints the results of the find()/grep() functions
4409+ </li>
4410+ </ul>
4411+ <p>Please see the <a
4412+ href="http://muharem.wordpress.com/2007/05/20/python-find-files-using-unix-shell-style-wildcards/"
4413+ target="_top">tutorial</a> as well as the documentation strings of the
4414+ particular functions for detailed information.</p>
4415+
4416+<!-- ==================== CLASSES ==================== -->
4417+<a name="section-Classes"></a>
4418+<table class="summary" border="1" cellpadding="3"
4419+ cellspacing="0" width="100%" bgcolor="white">
4420+<tr bgcolor="#70b0f0" class="table-header">
4421+ <td colspan="2" class="table-header">
4422+ <table border="0" cellpadding="0" cellspacing="0" width="100%">
4423+ <tr valign="top">
4424+ <td align="left"><span class="table-header">Classes</span></td>
4425+ <td align="right" valign="top"
4426+ ><span class="options">[<a href="#section-Classes"
4427+ class="privatelink" onclick="toggle_private();"
4428+ >hide private</a>]</span></td>
4429+ </tr>
4430+ </table>
4431+ </td>
4432+</tr>
4433+<tr>
4434+ <td width="15%" align="right" valign="top" class="summary">
4435+ <span class="summary-type">&nbsp;</span>
4436+ </td><td class="summary">
4437+ <a href="scriptutil.find.ScriptError-class.html" class="summary-name">ScriptError</a><br />
4438+ The exception raised in case of failures.
4439+ </td>
4440+ </tr>
4441+</table>
4442+<!-- ==================== FUNCTIONS ==================== -->
4443+<a name="section-Functions"></a>
4444+<table class="summary" border="1" cellpadding="3"
4445+ cellspacing="0" width="100%" bgcolor="white">
4446+<tr bgcolor="#70b0f0" class="table-header">
4447+ <td colspan="2" class="table-header">
4448+ <table border="0" cellpadding="0" cellspacing="0" width="100%">
4449+ <tr valign="top">
4450+ <td align="left"><span class="table-header">Functions</span></td>
4451+ <td align="right" valign="top"
4452+ ><span class="options">[<a href="#section-Functions"
4453+ class="privatelink" onclick="toggle_private();"
4454+ >hide private</a>]</span></td>
4455+ </tr>
4456+ </table>
4457+ </td>
4458+</tr>
4459+<tr>
4460+ <td width="15%" align="right" valign="top" class="summary">
4461+ <span class="summary-type">sequence</span>
4462+ </td><td class="summary">
4463+ <table width="100%" cellpadding="0" cellspacing="0" border="0">
4464+ <tr>
4465+ <td><span class="summary-sig"><a href="scriptutil.find-module.html#find" class="summary-sig-name">find</a>(<span class="summary-sig-arg">path</span>,
4466+ <span class="summary-sig-arg">shellglobs</span>=<span class="summary-sig-default">None</span>,
4467+ <span class="summary-sig-arg">namefs</span>=<span class="summary-sig-default">None</span>,
4468+ <span class="summary-sig-arg">relative</span>=<span class="summary-sig-default">True</span>)</span><br />
4469+ Find files in the directory tree starting at 'path' (filtered by Unix
4470+ shell-style wildcards ('shellglobs') and/or the functions in the
4471+ 'namefs' sequence).</td>
4472+ <td align="right" valign="top">
4473+ <span class="codelink"><a href="scriptutil.find-pysrc.html#find">source&nbsp;code</a></span>
4474+
4475+ </td>
4476+ </tr>
4477+ </table>
4478+
4479+ </td>
4480+ </tr>
4481+<tr>
4482+ <td width="15%" align="right" valign="top" class="summary">
4483+ <span class="summary-type">dict</span>
4484+ </td><td class="summary">
4485+ <table width="100%" cellpadding="0" cellspacing="0" border="0">
4486+ <tr>
4487+ <td><span class="summary-sig"><a href="scriptutil.find-module.html#grep" class="summary-sig-name">grep</a>(<span class="summary-sig-arg">path</span>,
4488+ <span class="summary-sig-arg">regexl</span>,
4489+ <span class="summary-sig-arg">shellglobs</span>=<span class="summary-sig-default">None</span>,
4490+ <span class="summary-sig-arg">namefs</span>=<span class="summary-sig-default">None</span>,
4491+ <span class="summary-sig-arg">relative</span>=<span class="summary-sig-default">True</span>,
4492+ <span class="summary-sig-arg">linenums</span>=<span class="summary-sig-default">False</span>)</span><br />
4493+ Find files in the directory tree starting at 'path' (filtered by Unix
4494+ shell-style wildcards ('shellglobs') and/or the functions in the
4495+ 'namefs' sequence) and search inside these.</td>
4496+ <td align="right" valign="top">
4497+ <span class="codelink"><a href="scriptutil.find-pysrc.html#grep">source&nbsp;code</a></span>
4498+
4499+ </td>
4500+ </tr>
4501+ </table>
4502+
4503+ </td>
4504+ </tr>
4505+<tr>
4506+ <td width="15%" align="right" valign="top" class="summary">
4507+ <span class="summary-type">number</span>
4508+ </td><td class="summary">
4509+ <table width="100%" cellpadding="0" cellspacing="0" border="0">
4510+ <tr>
4511+ <td><span class="summary-sig"><a href="scriptutil.find-module.html#replace" class="summary-sig-name">replace</a>(<span class="summary-sig-arg">path</span>,
4512+ <span class="summary-sig-arg">regexl</span>,
4513+ <span class="summary-sig-arg">shellglobs</span>=<span class="summary-sig-default">None</span>,
4514+ <span class="summary-sig-arg">namefs</span>=<span class="summary-sig-default">None</span>,
4515+ <span class="summary-sig-arg">bext</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">.bak</code><code class="variable-quote">'</code></span>)</span><br />
4516+ Find files in the directory tree starting at 'path' (filtered by Unix
4517+ shell-style wildcards ('shellglobs') and/or the functions in the
4518+ 'namefs' sequence) and perform an in-place search/replace operation
4519+ on these.</td>
4520+ <td align="right" valign="top">
4521+ <span class="codelink"><a href="scriptutil.find-pysrc.html#replace">source&nbsp;code</a></span>
4522+
4523+ </td>
4524+ </tr>
4525+ </table>
4526+
4527+ </td>
4528+ </tr>
4529+<tr>
4530+ <td width="15%" align="right" valign="top" class="summary">
4531+ <span class="summary-type">&nbsp;</span>
4532+ </td><td class="summary">
4533+ <table width="100%" cellpadding="0" cellspacing="0" border="0">
4534+ <tr>
4535+ <td><span class="summary-sig"><a href="scriptutil.find-module.html#pprint" class="summary-sig-name">pprint</a>(<span class="summary-sig-arg">results</span>)</span><br />
4536+ Print the results of the find()/grep() functions.</td>
4537+ <td align="right" valign="top">
4538+ <span class="codelink"><a href="scriptutil.find-pysrc.html#pprint">source&nbsp;code</a></span>
4539+
4540+ </td>
4541+ </tr>
4542+ </table>
4543+
4544+ </td>
4545+ </tr>
4546+</table>
4547+<!-- ==================== VARIABLES ==================== -->
4548+<a name="section-Variables"></a>
4549+<table class="summary" border="1" cellpadding="3"
4550+ cellspacing="0" width="100%" bgcolor="white">
4551+<tr bgcolor="#70b0f0" class="table-header">
4552+ <td colspan="2" class="table-header">
4553+ <table border="0" cellpadding="0" cellspacing="0" width="100%">
4554+ <tr valign="top">
4555+ <td align="left"><span class="table-header">Variables</span></td>
4556+ <td align="right" valign="top"
4557+ ><span class="options">[<a href="#section-Variables"
4558+ class="privatelink" onclick="toggle_private();"
4559+ >hide private</a>]</span></td>
4560+ </tr>
4561+ </table>
4562+ </td>
4563+</tr>
4564+<tr>
4565+ <td width="15%" align="right" valign="top" class="summary">
4566+ <span class="summary-type">&nbsp;</span>
4567+ </td><td class="summary">
4568+ <a name="__package__"></a><span class="summary-name">__package__</span> = <code title="'scriptutil'"><code class="variable-quote">'</code><code class="variable-string">scriptutil</code><code class="variable-quote">'</code></code>
4569+ </td>
4570+ </tr>
4571+</table>
4572+<!-- ==================== FUNCTION DETAILS ==================== -->
4573+<a name="section-FunctionDetails"></a>
4574+<table class="details" border="1" cellpadding="3"
4575+ cellspacing="0" width="100%" bgcolor="white">
4576+<tr bgcolor="#70b0f0" class="table-header">
4577+ <td colspan="2" class="table-header">
4578+ <table border="0" cellpadding="0" cellspacing="0" width="100%">
4579+ <tr valign="top">
4580+ <td align="left"><span class="table-header">Function Details</span></td>
4581+ <td align="right" valign="top"
4582+ ><span class="options">[<a href="#section-FunctionDetails"
4583+ class="privatelink" onclick="toggle_private();"
4584+ >hide private</a>]</span></td>
4585+ </tr>
4586+ </table>
4587+ </td>
4588+</tr>
4589+</table>
4590+<a name="find"></a>
4591+<div>
4592+<table class="details" border="1" cellpadding="3"
4593+ cellspacing="0" width="100%" bgcolor="white">
4594+<tr><td>
4595+ <table width="100%" cellpadding="0" cellspacing="0" border="0">
4596+ <tr valign="top"><td>
4597+ <h3 class="epydoc"><span class="sig"><span class="sig-name">find</span>(<span class="sig-arg">path</span>,
4598+ <span class="sig-arg">shellglobs</span>=<span class="sig-default">None</span>,
4599+ <span class="sig-arg">namefs</span>=<span class="sig-default">None</span>,
4600+ <span class="sig-arg">relative</span>=<span class="sig-default">True</span>)</span>
4601+ </h3>
4602+ </td><td align="right" valign="top"
4603+ ><span class="codelink"><a href="scriptutil.find-pysrc.html#find">source&nbsp;code</a></span>&nbsp;
4604+ </td>
4605+ </tr></table>
4606+
4607+ <p>Find files in the directory tree starting at 'path' (filtered by Unix
4608+ shell-style wildcards ('shellglobs') and/or the functions in the 'namefs'
4609+ sequence).</p>
4610+ <p>Please not that the shell wildcards work in a cumulative fashion i.e.
4611+ each of them is applied to the full set of file *names* found.</p>
4612+ <p>Conversely, all the functions in 'namefs'</p>
4613+ <ul>
4614+ <li>
4615+ only get to see the output of their respective predecessor function
4616+ in the sequence (with the obvious exception of the first function)
4617+ </li>
4618+ <li>
4619+ are applied to the full file *path* (whereas the shell-style
4620+ wildcards are only applied to the file *names*)
4621+ </li>
4622+ </ul>
4623+ <dl class="fields">
4624+ <dt>Parameters:</dt>
4625+ <dd><ul class="nomargin-top">
4626+ <li><strong class="pname"><code>path</code></strong> (string) - starting path of the directory tree to be searched</li>
4627+ <li><strong class="pname"><code>shellglobs</code></strong> (sequence) - an optional sequence of Unix shell-style wildcards that are to be
4628+ applied to the file *names* found</li>
4629+ <li><strong class="pname"><code>namefs</code></strong> (sequence) - an optional sequence of functions to be applied to the file
4630+ *paths* found</li>
4631+ <li><strong class="pname"><code>relative</code></strong> (bool) - a boolean flag that determines whether absolute or relative paths
4632+ should be returned</li>
4633+ </ul></dd>
4634+ <dt>Returns: sequence</dt>
4635+ <dd>paths for files found</dd>
4636+ </dl>
4637+</td></tr></table>
4638+</div>
4639+<a name="grep"></a>
4640+<div>
4641+<table class="details" border="1" cellpadding="3"
4642+ cellspacing="0" width="100%" bgcolor="white">
4643+<tr><td>
4644+ <table width="100%" cellpadding="0" cellspacing="0" border="0">
4645+ <tr valign="top"><td>
4646+ <h3 class="epydoc"><span class="sig"><span class="sig-name">grep</span>(<span class="sig-arg">path</span>,
4647+ <span class="sig-arg">regexl</span>,
4648+ <span class="sig-arg">shellglobs</span>=<span class="sig-default">None</span>,
4649+ <span class="sig-arg">namefs</span>=<span class="sig-default">None</span>,
4650+ <span class="sig-arg">relative</span>=<span class="sig-default">True</span>,
4651+ <span class="sig-arg">linenums</span>=<span class="sig-default">False</span>)</span>
4652+ </h3>
4653+ </td><td align="right" valign="top"
4654+ ><span class="codelink"><a href="scriptutil.find-pysrc.html#grep">source&nbsp;code</a></span>&nbsp;
4655+ </td>
4656+ </tr></table>
4657+
4658+ <p>Find files in the directory tree starting at 'path' (filtered by Unix
4659+ shell-style wildcards ('shellglobs') and/or the functions in the 'namefs'
4660+ sequence) and search inside these.</p>
4661+ <p>Additionaly, the file content will be filtered by the regular
4662+ expressions in the 'regexl' sequence. Each entry in the latter is a</p>
4663+ <ul>
4664+ <li>
4665+ either a string (with the regex definition)
4666+ </li>
4667+ <li>
4668+ or a tuple with arguments accepted by re.compile() (the re.M and re.S
4669+ flags will have no effect though)
4670+ </li>
4671+ </ul>
4672+ <p>For all the files that pass the file name/content tests the function
4673+ returns a dictionary where the</p>
4674+ <ul>
4675+ <li>
4676+ key is the file name and the
4677+ </li>
4678+ <li>
4679+ value is a string with lines filtered by 'regexl'
4680+ </li>
4681+ </ul>
4682+ <dl class="fields">
4683+ <dt>Parameters:</dt>
4684+ <dd><ul class="nomargin-top">
4685+ <li><strong class="pname"><code>path</code></strong> (string) - starting path of the directory tree to be searched</li>
4686+ <li><strong class="pname"><code>shellglobs</code></strong> (sequence) - an optional sequence of Unix shell-style wildcards that are to be
4687+ applied to the file *names* found</li>
4688+ <li><strong class="pname"><code>namefs</code></strong> (sequence) - an optional sequence of functions to be applied to the file
4689+ *paths* found</li>
4690+ <li><strong class="pname"><code>relative</code></strong> (bool) - a boolean flag that determines whether absolute or relative paths
4691+ should be returned</li>
4692+ <li><strong class="pname"><code>linenums</code></strong> (bool) - turns on line numbers for found files (like grep -n)</li>
4693+ </ul></dd>
4694+ <dt>Returns: dict</dt>
4695+ <dd>file name (key) and lines filtered by 'regexl' (value)</dd>
4696+ </dl>
4697+</td></tr></table>
4698+</div>
4699+<a name="replace"></a>
4700+<div>
4701+<table class="details" border="1" cellpadding="3"
4702+ cellspacing="0" width="100%" bgcolor="white">
4703+<tr><td>
4704+ <table width="100%" cellpadding="0" cellspacing="0" border="0">
4705+ <tr valign="top"><td>
4706+ <h3 class="epydoc"><span class="sig"><span class="sig-name">replace</span>(<span class="sig-arg">path</span>,
4707+ <span class="sig-arg">regexl</span>,
4708+ <span class="sig-arg">shellglobs</span>=<span class="sig-default">None</span>,
4709+ <span class="sig-arg">namefs</span>=<span class="sig-default">None</span>,
4710+ <span class="sig-arg">bext</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">.bak</code><code class="variable-quote">'</code></span>)</span>
4711+ </h3>
4712+ </td><td align="right" valign="top"
4713+ ><span class="codelink"><a href="scriptutil.find-pysrc.html#replace">source&nbsp;code</a></span>&nbsp;
4714+ </td>
4715+ </tr></table>
4716+
4717+ <p>Find files in the directory tree starting at 'path' (filtered by Unix
4718+ shell-style wildcards ('shellglobs') and/or the functions in the 'namefs'
4719+ sequence) and perform an in-place search/replace operation on these.</p>
4720+ <p>Additionally, an in-place search/replace operation is performed on the
4721+ content of all the files (whose names passed the tests) using the regular
4722+ expressions in 'regexl'.</p>
4723+ <p>Please note: 'regexl' is a sequence of 3-tuples, each having the
4724+ following elements:</p>
4725+ <ul>
4726+ <li>
4727+ search string (Python regex syntax)
4728+ </li>
4729+ <li>
4730+ replace string (Python regex syntax)
4731+ </li>
4732+ <li>
4733+ regex flags or 'None' (re.compile syntax)
4734+ </li>
4735+ </ul>
4736+ <p>Copies of the modified files are saved in backup files using the
4737+ extension specified in 'bext'.</p>
4738+ <dl class="fields">
4739+ <dt>Parameters:</dt>
4740+ <dd><ul class="nomargin-top">
4741+ <li><strong class="pname"><code>path</code></strong> (string) - starting path of the directory tree to be searched</li>
4742+ <li><strong class="pname"><code>shellglobs</code></strong> (sequence) - an optional sequence of Unix shell-style wildcards that are to be
4743+ applied to the file *names* found</li>
4744+ <li><strong class="pname"><code>namefs</code></strong> (sequence) - an optional sequence of functions to be applied to the file
4745+ *paths* found</li>
4746+ </ul></dd>
4747+ <dt>Returns: number</dt>
4748+ <dd>total number of files modified</dd>
4749+ </dl>
4750+</td></tr></table>
4751+</div>
4752+<a name="pprint"></a>
4753+<div>
4754+<table class="details" border="1" cellpadding="3"
4755+ cellspacing="0" width="100%" bgcolor="white">
4756+<tr><td>
4757+ <table width="100%" cellpadding="0" cellspacing="0" border="0">
4758+ <tr valign="top"><td>
4759+ <h3 class="epydoc"><span class="sig"><span class="sig-name">pprint</span>(<span class="sig-arg">results</span>)</span>
4760+ </h3>
4761+ </td><td align="right" valign="top"
4762+ ><span class="codelink"><a href="scriptutil.find-pysrc.html#pprint">source&nbsp;code</a></span>&nbsp;
4763+ </td>
4764+ </tr></table>
4765+
4766+ <p>Print the results of the find()/grep() functions.</p>
4767+ <p>The output format is similar to the one used by the UNIX find
4768+ utility.</p>
4769+ <dl class="fields">
4770+ </dl>
4771+</td></tr></table>
4772+</div>
4773+<br />
4774+<!-- ==================== NAVIGATION BAR ==================== -->
4775+<table class="navbar" border="0" width="100%" cellpadding="0"
4776+ bgcolor="#a0c0ff" cellspacing="0">
4777+ <tr valign="middle">
4778+ <!-- Home link -->
4779+ <th>&nbsp;&nbsp;&nbsp;<a
4780+ href="scriptutil-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
4781+
4782+ <!-- Tree link -->
4783+ <th>&nbsp;&nbsp;&nbsp;<a
4784+ href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
4785+
4786+ <!-- Index link -->
4787+ <th>&nbsp;&nbsp;&nbsp;<a
4788+ href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
4789+
4790+ <!-- Help link -->
4791+ <th>&nbsp;&nbsp;&nbsp;<a
4792+ href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
4793+
4794+ <!-- Project homepage -->
4795+ <th class="navbar" align="right" width="100%">
4796+ <table border="0" cellpadding="0" cellspacing="0">
4797+ <tr><th class="navbar" align="center"
4798+ ><a class="navbar" target="_top" href="https://launchpad.net/py-script">Project Homepage</a></th>
4799+ </tr></table></th>
4800+ </tr>
4801+</table>
4802+<table border="0" cellpadding="0" cellspacing="0" width="100%%">
4803+ <tr>
4804+ <td align="left" class="footer">
4805+ Generated by Epydoc 3.0.1 on Sat Dec 26 23:01:34 2009
4806+ </td>
4807+ <td align="right" class="footer">
4808+ <a target="mainFrame" href="http://epydoc.sourceforge.net"
4809+ >http://epydoc.sourceforge.net</a>
4810+ </td>
4811+ </tr>
4812+</table>
4813+
4814+<script type="text/javascript">
4815+ <!--
4816+ // Private objects are initially displayed (because if
4817+ // javascript is turned off then we want them to be
4818+ // visible); but by default, we want to hide them. So hide
4819+ // them unless we have a cookie that says to show them.
4820+ checkCookie();
4821+ // -->
4822+</script>
4823+</body>
4824+</html>
4825
4826=== added file 'doc/html/scriptutil.find-pysrc.html'
4827--- doc/html/scriptutil.find-pysrc.html 1970-01-01 00:00:00 +0000
4828+++ doc/html/scriptutil.find-pysrc.html 2009-12-26 22:06:14 +0000
4829@@ -0,0 +1,390 @@
4830+<?xml version="1.0" encoding="ascii"?>
4831+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4832+ "DTD/xhtml1-transitional.dtd">
4833+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4834+<head>
4835+ <title>scriptutil.find</title>
4836+ <link rel="stylesheet" href="epydoc.css" type="text/css" />
4837+ <script type="text/javascript" src="epydoc.js"></script>
4838+</head>
4839+
4840+<body bgcolor="white" text="black" link="blue" vlink="#204080"
4841+ alink="#204080">
4842+<!-- ==================== NAVIGATION BAR ==================== -->
4843+<table class="navbar" border="0" width="100%" cellpadding="0"
4844+ bgcolor="#a0c0ff" cellspacing="0">
4845+ <tr valign="middle">
4846+ <!-- Home link -->
4847+ <th>&nbsp;&nbsp;&nbsp;<a
4848+ href="scriptutil-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
4849+
4850+ <!-- Tree link -->
4851+ <th>&nbsp;&nbsp;&nbsp;<a
4852+ href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
4853+
4854+ <!-- Index link -->
4855+ <th>&nbsp;&nbsp;&nbsp;<a
4856+ href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
4857+
4858+ <!-- Help link -->
4859+ <th>&nbsp;&nbsp;&nbsp;<a
4860+ href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
4861+
4862+ <!-- Project homepage -->
4863+ <th class="navbar" align="right" width="100%">
4864+ <table border="0" cellpadding="0" cellspacing="0">
4865+ <tr><th class="navbar" align="center"
4866+ ><a class="navbar" target="_top" href="https://launchpad.net/py-script">Project Homepage</a></th>
4867+ </tr></table></th>
4868+ </tr>
4869+</table>
4870+<table width="100%" cellpadding="0" cellspacing="0">
4871+ <tr valign="top">
4872+ <td width="100%">
4873+ <span class="breadcrumbs">
4874+ <a href="scriptutil-module.html">Package&nbsp;scriptutil</a> ::
4875+ Script&nbsp;find
4876+ </span>
4877+ </td>
4878+ <td>
4879+ <table cellpadding="0" cellspacing="0">
4880+ <!-- hide/show private -->
4881+ <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
4882+ onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
4883+ <tr><td align="right"><span class="options"
4884+ >[<a href="frames.html" target="_top">frames</a
4885+ >]&nbsp;|&nbsp;<a href="scriptutil.find-pysrc.html"
4886+ target="_top">no&nbsp;frames</a>]</span></td></tr>
4887+ </table>
4888+ </td>
4889+ </tr>
4890+</table>
4891+<h1 class="epydoc">Source Code for <a href="scriptutil.find-module.html">Script scriptutil.find</a></h1>
4892+<pre class="py-src">
4893+<a name="L1"></a><tt class="py-lineno"> 1</tt> <tt class="py-line"><tt class="py-comment">#!/usr/bin/env python</tt> </tt>
4894+<a name="L2"></a><tt class="py-lineno"> 2</tt> <tt class="py-line"><tt class="py-comment"># encoding: utf-8</tt> </tt>
4895+<a name="L3"></a><tt class="py-lineno"> 3</tt> <tt class="py-line"> </tt>
4896+<a name="L4"></a><tt class="py-lineno"> 4</tt> <tt class="py-line"> </tt>
4897+<a name="L5"></a><tt class="py-lineno"> 5</tt> <tt class="py-line"><tt class="py-comment"># This file is part of py-script (https://launchpad.net/py-script)</tt> </tt>
4898+<a name="L6"></a><tt class="py-lineno"> 6</tt> <tt class="py-line"><tt class="py-comment">#</tt> </tt>
4899+<a name="L7"></a><tt class="py-lineno"> 7</tt> <tt class="py-line"><tt class="py-comment"># Copyright (C) 2009 Muharem Hrnjadovic &lt;muharem@linux.com&gt;</tt> </tt>
4900+<a name="L8"></a><tt class="py-lineno"> 8</tt> <tt class="py-line"><tt class="py-comment">#</tt> </tt>
4901+<a name="L9"></a><tt class="py-lineno"> 9</tt> <tt class="py-line"><tt class="py-comment"># This program is free software; you can redistribute it and/or modify</tt> </tt>
4902+<a name="L10"></a><tt class="py-lineno"> 10</tt> <tt class="py-line"><tt class="py-comment"># it under the terms of the GNU General Public License as published by</tt> </tt>
4903+<a name="L11"></a><tt class="py-lineno"> 11</tt> <tt class="py-line"><tt class="py-comment"># the Free Software Foundation; either version 2 of the License, or</tt> </tt>
4904+<a name="L12"></a><tt class="py-lineno"> 12</tt> <tt class="py-line"><tt class="py-comment"># (at your option) any later version.</tt> </tt>
4905+<a name="L13"></a><tt class="py-lineno"> 13</tt> <tt class="py-line"><tt class="py-comment">#</tt> </tt>
4906+<a name="L14"></a><tt class="py-lineno"> 14</tt> <tt class="py-line"><tt class="py-comment"># This program is distributed in the hope that it will be useful,</tt> </tt>
4907+<a name="L15"></a><tt class="py-lineno"> 15</tt> <tt class="py-line"><tt class="py-comment"># but WITHOUT ANY WARRANTY; without even the implied warranty of</tt> </tt>
4908+<a name="L16"></a><tt class="py-lineno"> 16</tt> <tt class="py-line"><tt class="py-comment"># MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</tt> </tt>
4909+<a name="L17"></a><tt class="py-lineno"> 17</tt> <tt class="py-line"><tt class="py-comment"># GNU General Public License for more details.</tt> </tt>
4910+<a name="L18"></a><tt class="py-lineno"> 18</tt> <tt class="py-line"><tt class="py-comment">#</tt> </tt>
4911+<a name="L19"></a><tt class="py-lineno"> 19</tt> <tt class="py-line"><tt class="py-comment"># You should have received a copy of the GNU General Public License along</tt> </tt>
4912+<a name="L20"></a><tt class="py-lineno"> 20</tt> <tt class="py-line"><tt class="py-comment"># with this program; if not, write to the Free Software Foundation, Inc.,</tt> </tt>
4913+<a name="L21"></a><tt class="py-lineno"> 21</tt> <tt class="py-line"><tt class="py-comment"># 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.</tt> </tt>
4914+<a name="L22"></a><tt class="py-lineno"> 22</tt> <tt class="py-line"> </tt>
4915+<a name="L23"></a><tt class="py-lineno"> 23</tt> <tt class="py-line"> </tt>
4916+<a name="L24"></a><tt class="py-lineno"> 24</tt> <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
4917+<a name="L25"></a><tt class="py-lineno"> 25</tt> <tt class="py-line"><tt class="py-docstring">Functions commonly used in shell scripting:</tt> </tt>
4918+<a name="L26"></a><tt class="py-lineno"> 26</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
4919+<a name="L27"></a><tt class="py-lineno"> 27</tt> <tt class="py-line"><tt class="py-docstring"> - find() : finds files in a directory tree</tt> </tt>
4920+<a name="L28"></a><tt class="py-lineno"> 28</tt> <tt class="py-line"><tt class="py-docstring"> - grep(): finds files in a directory tree and matches their</tt> </tt>
4921+<a name="L29"></a><tt class="py-lineno"> 29</tt> <tt class="py-line"><tt class="py-docstring"> content to regular expressions</tt> </tt>
4922+<a name="L30"></a><tt class="py-lineno"> 30</tt> <tt class="py-line"><tt class="py-docstring"> - replace() : in-place search/replace of files in a directory tree</tt> </tt>
4923+<a name="L31"></a><tt class="py-lineno"> 31</tt> <tt class="py-line"><tt class="py-docstring"> with regular expressions</tt> </tt>
4924+<a name="L32"></a><tt class="py-lineno"> 32</tt> <tt class="py-line"><tt class="py-docstring"> - pprint() : prints the results of the find()/grep() functions</tt> </tt>
4925+<a name="L33"></a><tt class="py-lineno"> 33</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
4926+<a name="L34"></a><tt class="py-lineno"> 34</tt> <tt class="py-line"><tt class="py-docstring">Please see the U{tutorial &lt;http://muharem.wordpress.com/2007/05/20/python-find-files-using-unix-shell-style-wildcards/&gt;} as well as the documentation strings of the particular functions for detailed information.</tt> </tt>
4927+<a name="L35"></a><tt class="py-lineno"> 35</tt> <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
4928+<a name="L36"></a><tt class="py-lineno"> 36</tt> <tt class="py-line"> </tt>
4929+<a name="L37"></a><tt class="py-lineno"> 37</tt> <tt class="py-line"> </tt>
4930+<a name="L38"></a><tt class="py-lineno"> 38</tt> <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">fnmatch</tt> </tt>
4931+<a name="L39"></a><tt class="py-lineno"> 39</tt> <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">itertools</tt> </tt>
4932+<a name="L40"></a><tt class="py-lineno"> 40</tt> <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">os</tt> </tt>
4933+<a name="L41"></a><tt class="py-lineno"> 41</tt> <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">sys</tt> </tt>
4934+<a name="L42"></a><tt class="py-lineno"> 42</tt> <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">re</tt> </tt>
4935+<a name="L43"></a><tt class="py-lineno"> 43</tt> <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">types</tt> </tt>
4936+<a name="L44"></a><tt class="py-lineno"> 44</tt> <tt class="py-line"> </tt>
4937+<a name="L45"></a><tt class="py-lineno"> 45</tt> <tt class="py-line"> </tt>
4938+<a name="ScriptError"></a><div id="ScriptError-def"><a name="L46"></a><tt class="py-lineno"> 46</tt> <a class="py-toggle" href="#" id="ScriptError-toggle" onclick="return toggle('ScriptError');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="scriptutil.find.ScriptError-class.html">ScriptError</a><tt class="py-op">(</tt><tt class="py-base-class">Exception</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
4939+</div><div id="ScriptError-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="ScriptError-expanded"><a name="L47"></a><tt class="py-lineno"> 47</tt> <tt class="py-line"> <tt class="py-docstring">"""The exception raised in case of failures."""</tt> </tt>
4940+</div><a name="L48"></a><tt class="py-lineno"> 48</tt> <tt class="py-line"> </tt>
4941+<a name="L49"></a><tt class="py-lineno"> 49</tt> <tt class="py-line"> </tt>
4942+<a name="find"></a><div id="find-def"><a name="L50"></a><tt class="py-lineno"> 50</tt> <a class="py-toggle" href="#" id="find-toggle" onclick="return toggle('find');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="scriptutil.find-module.html#find">find</a><tt class="py-op">(</tt><tt class="py-param">path</tt><tt class="py-op">,</tt> <tt class="py-param">shellglobs</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">namefs</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">relative</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
4943+</div><div id="find-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="find-expanded"><a name="L51"></a><tt class="py-lineno"> 51</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
4944+<a name="L52"></a><tt class="py-lineno"> 52</tt> <tt class="py-line"><tt class="py-docstring"> Find files in the directory tree starting at 'path' (filtered by</tt> </tt>
4945+<a name="L53"></a><tt class="py-lineno"> 53</tt> <tt class="py-line"><tt class="py-docstring"> Unix shell-style wildcards ('shellglobs') and/or the functions in</tt> </tt>
4946+<a name="L54"></a><tt class="py-lineno"> 54</tt> <tt class="py-line"><tt class="py-docstring"> the 'namefs' sequence).</tt> </tt>
4947+<a name="L55"></a><tt class="py-lineno"> 55</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
4948+<a name="L56"></a><tt class="py-lineno"> 56</tt> <tt class="py-line"><tt class="py-docstring"> Please not that the shell wildcards work in a cumulative fashion</tt> </tt>
4949+<a name="L57"></a><tt class="py-lineno"> 57</tt> <tt class="py-line"><tt class="py-docstring"> i.e. each of them is applied to the full set of file *names* found.</tt> </tt>
4950+<a name="L58"></a><tt class="py-lineno"> 58</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
4951+<a name="L59"></a><tt class="py-lineno"> 59</tt> <tt class="py-line"><tt class="py-docstring"> Conversely, all the functions in 'namefs'</tt> </tt>
4952+<a name="L60"></a><tt class="py-lineno"> 60</tt> <tt class="py-line"><tt class="py-docstring"> - only get to see the output of their respective predecessor</tt> </tt>
4953+<a name="L61"></a><tt class="py-lineno"> 61</tt> <tt class="py-line"><tt class="py-docstring"> function in the sequence (with the obvious exception of the</tt> </tt>
4954+<a name="L62"></a><tt class="py-lineno"> 62</tt> <tt class="py-line"><tt class="py-docstring"> first function)</tt> </tt>
4955+<a name="L63"></a><tt class="py-lineno"> 63</tt> <tt class="py-line"><tt class="py-docstring"> - are applied to the full file *path* (whereas the shell-style</tt> </tt>
4956+<a name="L64"></a><tt class="py-lineno"> 64</tt> <tt class="py-line"><tt class="py-docstring"> wildcards are only applied to the file *names*)</tt> </tt>
4957+<a name="L65"></a><tt class="py-lineno"> 65</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
4958+<a name="L66"></a><tt class="py-lineno"> 66</tt> <tt class="py-line"><tt class="py-docstring"> @type path: string</tt> </tt>
4959+<a name="L67"></a><tt class="py-lineno"> 67</tt> <tt class="py-line"><tt class="py-docstring"> @param path: starting path of the directory tree to be searched</tt> </tt>
4960+<a name="L68"></a><tt class="py-lineno"> 68</tt> <tt class="py-line"><tt class="py-docstring"> @type shellglobs: sequence</tt> </tt>
4961+<a name="L69"></a><tt class="py-lineno"> 69</tt> <tt class="py-line"><tt class="py-docstring"> @param shellglobs: an optional sequence of Unix shell-style wildcards</tt> </tt>
4962+<a name="L70"></a><tt class="py-lineno"> 70</tt> <tt class="py-line"><tt class="py-docstring"> that are to be applied to the file *names* found</tt> </tt>
4963+<a name="L71"></a><tt class="py-lineno"> 71</tt> <tt class="py-line"><tt class="py-docstring"> @type namefs: sequence</tt> </tt>
4964+<a name="L72"></a><tt class="py-lineno"> 72</tt> <tt class="py-line"><tt class="py-docstring"> @param namefs: an optional sequence of functions to be applied to the</tt> </tt>
4965+<a name="L73"></a><tt class="py-lineno"> 73</tt> <tt class="py-line"><tt class="py-docstring"> file *paths* found</tt> </tt>
4966+<a name="L74"></a><tt class="py-lineno"> 74</tt> <tt class="py-line"><tt class="py-docstring"> @type relative: bool</tt> </tt>
4967+<a name="L75"></a><tt class="py-lineno"> 75</tt> <tt class="py-line"><tt class="py-docstring"> @param relative: a boolean flag that determines whether absolute or</tt> </tt>
4968+<a name="L76"></a><tt class="py-lineno"> 76</tt> <tt class="py-line"><tt class="py-docstring"> relative paths should be returned</tt> </tt>
4969+<a name="L77"></a><tt class="py-lineno"> 77</tt> <tt class="py-line"><tt class="py-docstring"> @rtype: sequence</tt> </tt>
4970+<a name="L78"></a><tt class="py-lineno"> 78</tt> <tt class="py-line"><tt class="py-docstring"> @return: paths for files found</tt> </tt>
4971+<a name="L79"></a><tt class="py-lineno"> 79</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
4972+<a name="L80"></a><tt class="py-lineno"> 80</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">access</tt><tt class="py-op">(</tt><tt class="py-name">path</tt><tt class="py-op">,</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">R_OK</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
4973+<a name="L81"></a><tt class="py-lineno"> 81</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt id="link-0" class="py-name" targets="Class scriptutil.find.ScriptError=scriptutil.find.ScriptError-class.html"><a title="scriptutil.find.ScriptError" class="py-name" href="#" onclick="return doclink('link-0', 'ScriptError', 'link-0');">ScriptError</a></tt><tt class="py-op">(</tt><tt class="py-string">"cannot access path: '%s'"</tt> <tt class="py-op">%</tt> <tt class="py-name">path</tt><tt class="py-op">)</tt> </tt>
4974+<a name="L82"></a><tt class="py-lineno"> 82</tt> <tt class="py-line"> </tt>
4975+<a name="L83"></a><tt class="py-lineno"> 83</tt> <tt class="py-line"> <tt class="py-name">fileList</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> <tt class="py-comment"># result list</tt> </tt>
4976+<a name="L84"></a><tt class="py-lineno"> 84</tt> <tt class="py-line"> <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
4977+<a name="L85"></a><tt class="py-lineno"> 85</tt> <tt class="py-line"> <tt class="py-keyword">for</tt> <tt class="py-name">dir</tt><tt class="py-op">,</tt> <tt class="py-name">subdirs</tt><tt class="py-op">,</tt> <tt class="py-name">files</tt> <tt class="py-keyword">in</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">walk</tt><tt class="py-op">(</tt><tt class="py-name">path</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
4978+<a name="L86"></a><tt class="py-lineno"> 86</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">shellglobs</tt><tt class="py-op">:</tt> </tt>
4979+<a name="L87"></a><tt class="py-lineno"> 87</tt> <tt class="py-line"> <tt class="py-name">matched</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
4980+<a name="L88"></a><tt class="py-lineno"> 88</tt> <tt class="py-line"> <tt class="py-keyword">for</tt> <tt class="py-name">pattern</tt> <tt class="py-keyword">in</tt> <tt class="py-name">shellglobs</tt><tt class="py-op">:</tt> </tt>
4981+<a name="L89"></a><tt class="py-lineno"> 89</tt> <tt class="py-line"> <tt class="py-name">filterf</tt> <tt class="py-op">=</tt> <tt class="py-keyword">lambda</tt> <tt class="py-name">s</tt><tt class="py-op">:</tt> <tt class="py-name">fnmatch</tt><tt class="py-op">.</tt><tt class="py-name">fnmatchcase</tt><tt class="py-op">(</tt><tt class="py-name">s</tt><tt class="py-op">,</tt> <tt class="py-name">pattern</tt><tt class="py-op">)</tt> </tt>
4982+<a name="L90"></a><tt class="py-lineno"> 90</tt> <tt class="py-line"> <tt class="py-name">matched</tt><tt class="py-op">.</tt><tt class="py-name">extend</tt><tt class="py-op">(</tt><tt class="py-name">filter</tt><tt class="py-op">(</tt><tt class="py-name">filterf</tt><tt class="py-op">,</tt> <tt class="py-name">files</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
4983+<a name="L91"></a><tt class="py-lineno"> 91</tt> <tt class="py-line"> <tt class="py-name">fileList</tt><tt class="py-op">.</tt><tt class="py-name">extend</tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-string">'%s%s%s'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">dir</tt><tt class="py-op">,</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">sep</tt><tt class="py-op">,</tt> <tt class="py-name">f</tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt class="py-name">f</tt> <tt class="py-keyword">in</tt> <tt class="py-name">matched</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
4984+<a name="L92"></a><tt class="py-lineno"> 92</tt> <tt class="py-line"> <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
4985+<a name="L93"></a><tt class="py-lineno"> 93</tt> <tt class="py-line"> <tt class="py-name">fileList</tt><tt class="py-op">.</tt><tt class="py-name">extend</tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-string">'%s%s%s'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">dir</tt><tt class="py-op">,</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">sep</tt><tt class="py-op">,</tt> <tt class="py-name">f</tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt class="py-name">f</tt> <tt class="py-keyword">in</tt> <tt class="py-name">files</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
4986+<a name="L94"></a><tt class="py-lineno"> 94</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">relative</tt><tt class="py-op">:</tt> <tt class="py-name">fileList</tt> <tt class="py-op">=</tt> <tt class="py-name">map</tt><tt class="py-op">(</tt><tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">abspath</tt><tt class="py-op">,</tt> <tt class="py-name">fileList</tt><tt class="py-op">)</tt> </tt>
4987+<a name="L95"></a><tt class="py-lineno"> 95</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">namefs</tt><tt class="py-op">:</tt> </tt>
4988+<a name="L96"></a><tt class="py-lineno"> 96</tt> <tt class="py-line"> <tt class="py-keyword">for</tt> <tt class="py-name">ff</tt> <tt class="py-keyword">in</tt> <tt class="py-name">namefs</tt><tt class="py-op">:</tt> <tt class="py-name">fileList</tt> <tt class="py-op">=</tt> <tt class="py-name">filter</tt><tt class="py-op">(</tt><tt class="py-name">ff</tt><tt class="py-op">,</tt> <tt class="py-name">fileList</tt><tt class="py-op">)</tt> </tt>
4989+<a name="L97"></a><tt class="py-lineno"> 97</tt> <tt class="py-line"> <tt class="py-keyword">except</tt> <tt class="py-name">Exception</tt><tt class="py-op">,</tt> <tt class="py-name">e</tt><tt class="py-op">:</tt> <tt class="py-keyword">raise</tt> <tt id="link-1" class="py-name"><a title="scriptutil.find.ScriptError" class="py-name" href="#" onclick="return doclink('link-1', 'ScriptError', 'link-0');">ScriptError</a></tt><tt class="py-op">(</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">e</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
4990+<a name="L98"></a><tt class="py-lineno"> 98</tt> <tt class="py-line"> <tt class="py-keyword">return</tt><tt class="py-op">(</tt><tt class="py-name">fileList</tt><tt class="py-op">)</tt> </tt>
4991+</div><a name="L99"></a><tt class="py-lineno"> 99</tt> <tt class="py-line"> </tt>
4992+<a name="L100"></a><tt class="py-lineno">100</tt> <tt class="py-line"> </tt>
4993+<a name="grep"></a><div id="grep-def"><a name="L101"></a><tt class="py-lineno">101</tt> <a class="py-toggle" href="#" id="grep-toggle" onclick="return toggle('grep');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="scriptutil.find-module.html#grep">grep</a><tt class="py-op">(</tt><tt class="py-param">path</tt><tt class="py-op">,</tt> <tt class="py-param">regexl</tt><tt class="py-op">,</tt> <tt class="py-param">shellglobs</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">namefs</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
4994+<a name="L102"></a><tt class="py-lineno">102</tt> <tt class="py-line"> <tt class="py-param">relative</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">,</tt> <tt class="py-param">linenums</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
4995+</div><div id="grep-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="grep-expanded"><a name="L103"></a><tt class="py-lineno">103</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
4996+<a name="L104"></a><tt class="py-lineno">104</tt> <tt class="py-line"><tt class="py-docstring"> Find files in the directory tree starting at 'path' (filtered by</tt> </tt>
4997+<a name="L105"></a><tt class="py-lineno">105</tt> <tt class="py-line"><tt class="py-docstring"> Unix shell-style wildcards ('shellglobs') and/or the functions in</tt> </tt>
4998+<a name="L106"></a><tt class="py-lineno">106</tt> <tt class="py-line"><tt class="py-docstring"> the 'namefs' sequence) and search inside these.</tt> </tt>
4999+<a name="L107"></a><tt class="py-lineno">107</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
5000+<a name="L108"></a><tt class="py-lineno">108</tt> <tt class="py-line"><tt class="py-docstring"> Additionaly, the file content will be filtered by the regular</tt> </tt>
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches

to all changes: