|
1 <?xml version="1.0" encoding="ascii"?> |
|
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" |
|
3 "DTD/xhtml1-transitional.dtd"> |
|
4 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> |
|
5 <head> |
|
6 <title>ats3.parsers.PkgFileParser</title> |
|
7 <link rel="stylesheet" href="epydoc.css" type="text/css" /> |
|
8 <script type="text/javascript" src="epydoc.js"></script> |
|
9 </head> |
|
10 |
|
11 <body bgcolor="white" text="black" link="blue" vlink="#204080" |
|
12 alink="#204080"> |
|
13 <!-- ==================== NAVIGATION BAR ==================== --> |
|
14 <table class="navbar" border="0" width="100%" cellpadding="0" |
|
15 bgcolor="#a0c0ff" cellspacing="0"> |
|
16 <tr valign="middle"> |
|
17 |
|
18 <!-- Tree link --> |
|
19 <th> <a |
|
20 href="module-tree.html">Trees</a> </th> |
|
21 |
|
22 <!-- Index link --> |
|
23 <th> <a |
|
24 href="identifier-index.html">Indices</a> </th> |
|
25 |
|
26 <!-- Help link --> |
|
27 <th> <a |
|
28 href="help.html">Help</a> </th> |
|
29 |
|
30 <th class="navbar" width="100%"></th> |
|
31 </tr> |
|
32 </table> |
|
33 <table width="100%" cellpadding="0" cellspacing="0"> |
|
34 <tr valign="top"> |
|
35 <td width="100%"> |
|
36 <span class="breadcrumbs"> |
|
37 <a href="ats3-module.html">Package ats3</a> :: |
|
38 <a href="ats3.parsers-module.html">Module parsers</a> :: |
|
39 Class PkgFileParser |
|
40 </span> |
|
41 </td> |
|
42 <td> |
|
43 <table cellpadding="0" cellspacing="0"> |
|
44 <!-- hide/show private --> |
|
45 <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink" |
|
46 onclick="toggle_private();">hide private</a>]</span></td></tr> |
|
47 <tr><td align="right"><span class="options" |
|
48 >[<a href="frames.html" target="_top">frames</a |
|
49 >] | <a href="ats3.parsers.PkgFileParser-class.html" |
|
50 target="_top">no frames</a>]</span></td></tr> |
|
51 </table> |
|
52 </td> |
|
53 </tr> |
|
54 </table> |
|
55 <!-- ==================== CLASS DESCRIPTION ==================== --> |
|
56 <h1 class="epydoc">Class PkgFileParser</h1><span class="codelink"><a href="ats3.parsers-pysrc.html#PkgFileParser">source code</a></span><br /><br /> |
|
57 <pre class="base-tree"> |
|
58 object --+ |
|
59 | |
|
60 <strong class="uidshort">PkgFileParser</strong> |
|
61 </pre> |
|
62 |
|
63 <hr /> |
|
64 <dl class="rst-docutils"> |
|
65 <dt>Parses .pkg files. Returns a list of:</dt> |
|
66 <dd><ol class="rst-first rst-last rst-loweralpha simple"> |
|
67 <li>src path of the file</li> |
|
68 <li>dst path on the phone</li> |
|
69 <li>type of the file</li> |
|
70 </ol> |
|
71 </dd> |
|
72 </dl> |
|
73 <p>for every file in the pkg file</p><br /><br /> |
|
74 |
|
75 <!-- ==================== INSTANCE METHODS ==================== --> |
|
76 <a name="section-InstanceMethods"></a> |
|
77 <table class="summary" border="1" cellpadding="3" |
|
78 cellspacing="0" width="100%" bgcolor="white"> |
|
79 <tr bgcolor="#70b0f0" class="table-header"> |
|
80 <td colspan="2" class="table-header"> |
|
81 <table border="0" cellpadding="0" cellspacing="0" width="100%"> |
|
82 <tr valign="top"> |
|
83 <td align="left"><span class="table-header">Instance Methods</span></td> |
|
84 <td align="right" valign="top" |
|
85 ><span class="options">[<a href="#section-InstanceMethods" |
|
86 class="privatelink" onclick="toggle_private();" |
|
87 >hide private</a>]</span></td> |
|
88 </tr> |
|
89 </table> |
|
90 </td> |
|
91 </tr> |
|
92 <tr> |
|
93 <td width="15%" align="right" valign="top" class="summary"> |
|
94 <span class="summary-type"> </span> |
|
95 </td><td class="summary"> |
|
96 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
97 <tr> |
|
98 <td><span class="summary-sig"><a href="ats3.parsers.PkgFileParser-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>, |
|
99 <span class="summary-sig-arg">platform</span>=<span class="summary-sig-default">None</span>)</span><br /> |
|
100 x.__init__(...) initializes x; see x.__class__.__doc__ for signature</td> |
|
101 <td align="right" valign="top"> |
|
102 <span class="codelink"><a href="ats3.parsers-pysrc.html#PkgFileParser.__init__">source code</a></span> |
|
103 |
|
104 </td> |
|
105 </tr> |
|
106 </table> |
|
107 |
|
108 </td> |
|
109 </tr> |
|
110 <tr> |
|
111 <td width="15%" align="right" valign="top" class="summary"> |
|
112 <span class="summary-type"> </span> |
|
113 </td><td class="summary"> |
|
114 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
115 <tr> |
|
116 <td><span class="summary-sig"><a href="ats3.parsers.PkgFileParser-class.html#get_pkg_files" class="summary-sig-name">get_pkg_files</a>(<span class="summary-sig-arg">self</span>, |
|
117 <span class="summary-sig-arg">location</span>=<span class="summary-sig-default">None</span>, |
|
118 <span class="summary-sig-arg">with_full_path</span>=<span class="summary-sig-default">True</span>)</span><br /> |
|
119 Returns list of PKG files on the given location.</td> |
|
120 <td align="right" valign="top"> |
|
121 <span class="codelink"><a href="ats3.parsers-pysrc.html#PkgFileParser.get_pkg_files">source code</a></span> |
|
122 |
|
123 </td> |
|
124 </tr> |
|
125 </table> |
|
126 |
|
127 </td> |
|
128 </tr> |
|
129 <tr> |
|
130 <td width="15%" align="right" valign="top" class="summary"> |
|
131 <span class="summary-type"> </span> |
|
132 </td><td class="summary"> |
|
133 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
134 <tr> |
|
135 <td><span class="summary-sig"><a href="ats3.parsers.PkgFileParser-class.html#get_data_files" class="summary-sig-name">get_data_files</a>(<span class="summary-sig-arg">self</span>, |
|
136 <span class="summary-sig-arg">location</span>=<span class="summary-sig-default">[]</span>, |
|
137 <span class="summary-sig-arg">drive</span>=<span class="summary-sig-default">""</span>, |
|
138 <span class="summary-sig-arg">exclude</span>=<span class="summary-sig-default">""</span>)</span><br /> |
|
139 Returns data files, source and destination of the files to be installed |
|
140 on the phone |
|
141 e.g.</td> |
|
142 <td align="right" valign="top"> |
|
143 <span class="codelink"><a href="ats3.parsers-pysrc.html#PkgFileParser.get_data_files">source code</a></span> |
|
144 |
|
145 </td> |
|
146 </tr> |
|
147 </table> |
|
148 |
|
149 </td> |
|
150 </tr> |
|
151 <tr class="private"> |
|
152 <td width="15%" align="right" valign="top" class="summary"> |
|
153 <span class="summary-type"> </span> |
|
154 </td><td class="summary"> |
|
155 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
156 <tr> |
|
157 <td><span class="summary-sig"><a name="__map_pkg_path"></a><span class="summary-sig-name">__map_pkg_path</span>(<span class="summary-sig-arg">self</span>, |
|
158 <span class="summary-sig-arg">pkg_line</span>, |
|
159 <span class="summary-sig-arg">pkg_file_path</span>)</span><br /> |
|
160 Parse package file to get the src and dst paths" for installing files</td> |
|
161 <td align="right" valign="top"> |
|
162 <span class="codelink"><a href="ats3.parsers-pysrc.html#PkgFileParser.__map_pkg_path">source code</a></span> |
|
163 |
|
164 </td> |
|
165 </tr> |
|
166 </table> |
|
167 |
|
168 </td> |
|
169 </tr> |
|
170 <tr class="private"> |
|
171 <td width="15%" align="right" valign="top" class="summary"> |
|
172 <span class="summary-type"> </span> |
|
173 </td><td class="summary"> |
|
174 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
175 <tr> |
|
176 <td><span class="summary-sig"><a name="__read_pkg_file"></a><span class="summary-sig-name">__read_pkg_file</span>(<span class="summary-sig-arg">self</span>, |
|
177 <span class="summary-sig-arg">pkg_files</span>)</span><br /> |
|
178 Reads contents of PKG file</td> |
|
179 <td align="right" valign="top"> |
|
180 <span class="codelink"><a href="ats3.parsers-pysrc.html#PkgFileParser.__read_pkg_file">source code</a></span> |
|
181 |
|
182 </td> |
|
183 </tr> |
|
184 </table> |
|
185 |
|
186 </td> |
|
187 </tr> |
|
188 <tr> |
|
189 <td colspan="2" class="summary"> |
|
190 <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>: |
|
191 <code>__delattr__</code>, |
|
192 <code>__getattribute__</code>, |
|
193 <code>__hash__</code>, |
|
194 <code>__new__</code>, |
|
195 <code>__reduce__</code>, |
|
196 <code>__reduce_ex__</code>, |
|
197 <code>__repr__</code>, |
|
198 <code>__setattr__</code>, |
|
199 <code>__str__</code> |
|
200 </p> |
|
201 </td> |
|
202 </tr> |
|
203 </table> |
|
204 <!-- ==================== PROPERTIES ==================== --> |
|
205 <a name="section-Properties"></a> |
|
206 <table class="summary" border="1" cellpadding="3" |
|
207 cellspacing="0" width="100%" bgcolor="white"> |
|
208 <tr bgcolor="#70b0f0" class="table-header"> |
|
209 <td colspan="2" class="table-header"> |
|
210 <table border="0" cellpadding="0" cellspacing="0" width="100%"> |
|
211 <tr valign="top"> |
|
212 <td align="left"><span class="table-header">Properties</span></td> |
|
213 <td align="right" valign="top" |
|
214 ><span class="options">[<a href="#section-Properties" |
|
215 class="privatelink" onclick="toggle_private();" |
|
216 >hide private</a>]</span></td> |
|
217 </tr> |
|
218 </table> |
|
219 </td> |
|
220 </tr> |
|
221 <tr> |
|
222 <td colspan="2" class="summary"> |
|
223 <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>: |
|
224 <code>__class__</code> |
|
225 </p> |
|
226 </td> |
|
227 </tr> |
|
228 </table> |
|
229 <!-- ==================== METHOD DETAILS ==================== --> |
|
230 <a name="section-MethodDetails"></a> |
|
231 <table class="details" border="1" cellpadding="3" |
|
232 cellspacing="0" width="100%" bgcolor="white"> |
|
233 <tr bgcolor="#70b0f0" class="table-header"> |
|
234 <td colspan="2" class="table-header"> |
|
235 <table border="0" cellpadding="0" cellspacing="0" width="100%"> |
|
236 <tr valign="top"> |
|
237 <td align="left"><span class="table-header">Method Details</span></td> |
|
238 <td align="right" valign="top" |
|
239 ><span class="options">[<a href="#section-MethodDetails" |
|
240 class="privatelink" onclick="toggle_private();" |
|
241 >hide private</a>]</span></td> |
|
242 </tr> |
|
243 </table> |
|
244 </td> |
|
245 </tr> |
|
246 </table> |
|
247 <a name="__init__"></a> |
|
248 <div> |
|
249 <table class="details" border="1" cellpadding="3" |
|
250 cellspacing="0" width="100%" bgcolor="white"> |
|
251 <tr><td> |
|
252 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
253 <tr valign="top"><td> |
|
254 <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>, |
|
255 <span class="sig-arg">platform</span>=<span class="sig-default">None</span>)</span> |
|
256 <br /><em class="fname">(Constructor)</em> |
|
257 </h3> |
|
258 </td><td align="right" valign="top" |
|
259 ><span class="codelink"><a href="ats3.parsers-pysrc.html#PkgFileParser.__init__">source code</a></span> |
|
260 </td> |
|
261 </table> |
|
262 |
|
263 x.__init__(...) initializes x; see x.__class__.__doc__ for signature |
|
264 <dl class="fields"> |
|
265 <dt>Overrides: |
|
266 object.__init__ |
|
267 <dd><em class="note">(inherited documentation)</em></dd> |
|
268 </dt> |
|
269 </dl> |
|
270 </td></tr></table> |
|
271 </div> |
|
272 <a name="get_pkg_files"></a> |
|
273 <div> |
|
274 <table class="details" border="1" cellpadding="3" |
|
275 cellspacing="0" width="100%" bgcolor="white"> |
|
276 <tr><td> |
|
277 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
278 <tr valign="top"><td> |
|
279 <h3 class="epydoc"><span class="sig"><span class="sig-name">get_pkg_files</span>(<span class="sig-arg">self</span>, |
|
280 <span class="sig-arg">location</span>=<span class="sig-default">None</span>, |
|
281 <span class="sig-arg">with_full_path</span>=<span class="sig-default">True</span>)</span> |
|
282 </h3> |
|
283 </td><td align="right" valign="top" |
|
284 ><span class="codelink"><a href="ats3.parsers-pysrc.html#PkgFileParser.get_pkg_files">source code</a></span> |
|
285 </td> |
|
286 </table> |
|
287 |
|
288 <pre class="literalblock"> |
|
289 |
|
290 Returns list of PKG files on the given location. If True, full path is returned |
|
291 otherwise only filenames. Default is set to True |
|
292 |
|
293 Assume at location "c:bdiles", two pkg file '1.pkg' and '2.pkg', then the funtion |
|
294 can be called as: |
|
295 1. get_pkg_files("c:bdiles") - will return a list of pkg files with full paths. |
|
296 like ['c:bdiles.pkg', 'c:bdiles.pkg'] |
|
297 2. get_pkg_files("c:bdiles", False) - will return a list of pkg files only. |
|
298 like ['1.pkg', '2.pkg'] |
|
299 |
|
300 </pre> |
|
301 <dl class="fields"> |
|
302 </dl> |
|
303 </td></tr></table> |
|
304 </div> |
|
305 <a name="get_data_files"></a> |
|
306 <div> |
|
307 <table class="details" border="1" cellpadding="3" |
|
308 cellspacing="0" width="100%" bgcolor="white"> |
|
309 <tr><td> |
|
310 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
311 <tr valign="top"><td> |
|
312 <h3 class="epydoc"><span class="sig"><span class="sig-name">get_data_files</span>(<span class="sig-arg">self</span>, |
|
313 <span class="sig-arg">location</span>=<span class="sig-default">[]</span>, |
|
314 <span class="sig-arg">drive</span>=<span class="sig-default">""</span>, |
|
315 <span class="sig-arg">exclude</span>=<span class="sig-default">""</span>)</span> |
|
316 </h3> |
|
317 </td><td align="right" valign="top" |
|
318 ><span class="codelink"><a href="ats3.parsers-pysrc.html#PkgFileParser.get_data_files">source code</a></span> |
|
319 </td> |
|
320 </table> |
|
321 |
|
322 <pre class="literalblock"> |
|
323 |
|
324 Returns data files, source and destination of the files to be installed |
|
325 on the phone |
|
326 e.g. location = tsrc estComponent\group |
|
327 |
|
328 Function can be called in any of the following ways: |
|
329 1. get_data_files("c:bcbc.pkg") - only data files' paths are returnd |
|
330 as they are mention in the pkg file |
|
331 2. get_data_files("c:bcbc.pkg", "x:") - Proper data files' paths are returnd |
|
332 with drive letter included |
|
333 3. get_data_files("c:bcbc.pkg", "x:", "\.dll") - Data files' paths are returnd with |
|
334 drive letter included but the dll |
|
335 files will be excluded if found in |
|
336 the pkg file |
|
337 |
|
338 if pkg file is not given, the function will try to find the file(s) on the given location with extension ".pkg" |
|
339 |
|
340 </pre> |
|
341 <dl class="fields"> |
|
342 </dl> |
|
343 </td></tr></table> |
|
344 </div> |
|
345 <br /> |
|
346 <!-- ==================== NAVIGATION BAR ==================== --> |
|
347 <table class="navbar" border="0" width="100%" cellpadding="0" |
|
348 bgcolor="#a0c0ff" cellspacing="0"> |
|
349 <tr valign="middle"> |
|
350 |
|
351 <!-- Tree link --> |
|
352 <th> <a |
|
353 href="module-tree.html">Trees</a> </th> |
|
354 |
|
355 <!-- Index link --> |
|
356 <th> <a |
|
357 href="identifier-index.html">Indices</a> </th> |
|
358 |
|
359 <!-- Help link --> |
|
360 <th> <a |
|
361 href="help.html">Help</a> </th> |
|
362 |
|
363 <th class="navbar" width="100%"></th> |
|
364 </tr> |
|
365 </table> |
|
366 <table border="0" cellpadding="0" cellspacing="0" width="100%%"> |
|
367 <tr> |
|
368 <td align="left" class="footer"> |
|
369 Generated by Epydoc 3.0beta1 on Wed Sep 09 13:44:17 2009 |
|
370 </td> |
|
371 <td align="right" class="footer"> |
|
372 <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a> |
|
373 </td> |
|
374 </tr> |
|
375 </table> |
|
376 |
|
377 <script type="text/javascript"> |
|
378 <!-- |
|
379 // Private objects are initially displayed (because if |
|
380 // javascript is turned off then we want them to be |
|
381 // visible); but by default, we want to hide them. So hide |
|
382 // them unless we have a cookie that says to show them. |
|
383 checkCookie() |
|
384 // --> |
|
385 </script> |
|
386 |
|
387 </body> |
|
388 </html> |