|
1 <?xml version="1.0" encoding="utf-8"?> |
|
2 <!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' |
|
3 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'> |
|
4 <html><head> |
|
5 <title>eric5.UtilitiesPython2.Tools</title> |
|
6 <style> |
|
7 body { |
|
8 background: #EDECE6; |
|
9 margin: 0em 1em 10em 1em; |
|
10 color: black; |
|
11 } |
|
12 |
|
13 h1 { color: white; background: #85774A; } |
|
14 h2 { color: white; background: #85774A; } |
|
15 h3 { color: white; background: #9D936E; } |
|
16 h4 { color: white; background: #9D936E; } |
|
17 |
|
18 a { color: #BA6D36; } |
|
19 |
|
20 </style> |
|
21 </head> |
|
22 <body><a NAME="top" ID="top"></a> |
|
23 <h1>eric5.UtilitiesPython2.Tools</h1> |
|
24 <p> |
|
25 Module implementing tool functions. |
|
26 </p> |
|
27 <h3>Global Attributes</h3> |
|
28 <table> |
|
29 <tr><td>coding_regexps</td></tr> |
|
30 </table> |
|
31 <h3>Classes</h3> |
|
32 <table> |
|
33 <tr><td>None</td></tr> |
|
34 </table> |
|
35 <h3>Functions</h3> |
|
36 <table> |
|
37 <tr> |
|
38 <td><a href="#decode">decode</a></td> |
|
39 <td>Function to decode a text.</td> |
|
40 </tr><tr> |
|
41 <td><a href="#get_coding">get_coding</a></td> |
|
42 <td>Function to get the coding of a text.</td> |
|
43 </tr><tr> |
|
44 <td><a href="#normalizeCode">normalizeCode</a></td> |
|
45 <td>Function to normalize the given code.</td> |
|
46 </tr><tr> |
|
47 <td><a href="#readEncodedFile">readEncodedFile</a></td> |
|
48 <td>Function to read a file and decode it's contents into proper text.</td> |
|
49 </tr> |
|
50 </table> |
|
51 <hr /><hr /> |
|
52 <a NAME="decode" ID="decode"></a> |
|
53 <h2>decode</h2> |
|
54 <b>decode</b>(<i>text</i>) |
|
55 <p> |
|
56 Function to decode a text. |
|
57 </p><dl> |
|
58 <dt><i>text</i></dt> |
|
59 <dd> |
|
60 text to decode (string) |
|
61 </dd> |
|
62 </dl><dl> |
|
63 <dt>Returns:</dt> |
|
64 <dd> |
|
65 decoded text and encoding |
|
66 </dd> |
|
67 </dl> |
|
68 <div align="right"><a href="#top">Up</a></div> |
|
69 <hr /><hr /> |
|
70 <a NAME="get_coding" ID="get_coding"></a> |
|
71 <h2>get_coding</h2> |
|
72 <b>get_coding</b>(<i>text</i>) |
|
73 <p> |
|
74 Function to get the coding of a text. |
|
75 </p><dl> |
|
76 <dt><i>text</i></dt> |
|
77 <dd> |
|
78 text to inspect (string) |
|
79 </dd> |
|
80 </dl><dl> |
|
81 <dt>Returns:</dt> |
|
82 <dd> |
|
83 coding string |
|
84 </dd> |
|
85 </dl> |
|
86 <div align="right"><a href="#top">Up</a></div> |
|
87 <hr /><hr /> |
|
88 <a NAME="normalizeCode" ID="normalizeCode"></a> |
|
89 <h2>normalizeCode</h2> |
|
90 <b>normalizeCode</b>(<i>codestring</i>) |
|
91 <p> |
|
92 Function to normalize the given code. |
|
93 </p><dl> |
|
94 <dt><i>codestring</i></dt> |
|
95 <dd> |
|
96 code to be normalized (string) |
|
97 </dd> |
|
98 </dl><dl> |
|
99 <dt>Returns:</dt> |
|
100 <dd> |
|
101 normalized code (string) |
|
102 </dd> |
|
103 </dl> |
|
104 <div align="right"><a href="#top">Up</a></div> |
|
105 <hr /><hr /> |
|
106 <a NAME="readEncodedFile" ID="readEncodedFile"></a> |
|
107 <h2>readEncodedFile</h2> |
|
108 <b>readEncodedFile</b>(<i>filename</i>) |
|
109 <p> |
|
110 Function to read a file and decode it's contents into proper text. |
|
111 </p><dl> |
|
112 <dt><i>filename</i></dt> |
|
113 <dd> |
|
114 name of the file to read (string) |
|
115 </dd> |
|
116 </dl><dl> |
|
117 <dt>Returns:</dt> |
|
118 <dd> |
|
119 tuple of decoded text and encoding (string, string) |
|
120 </dd> |
|
121 </dl> |
|
122 <div align="right"><a href="#top">Up</a></div> |
|
123 <hr /> |
|
124 </body></html> |