Documentation/Source/eric5.Utilities.__init__.html

branch
Py2 comp.
changeset 2571
e6bb19eb87ea
parent 2387
2d119e79ab54
child 2677
3d4277929fb3
--- a/Documentation/Source/eric5.Utilities.__init__.html	Thu Mar 28 20:09:00 2013 +0100
+++ b/Documentation/Source/eric5.Utilities.__init__.html	Mon Apr 08 07:52:06 2013 +0200
@@ -25,7 +25,7 @@
 </p>
 <h3>Global Attributes</h3>
 <table>
-<tr><td>_escape</td></tr><tr><td>_escape_map</td></tr><tr><td>_uescape</td></tr><tr><td>_uunescape</td></tr><tr><td>codingBytes_regexps</td></tr><tr><td>coding_regexps</td></tr><tr><td>configDir</td></tr><tr><td>supportedCodecs</td></tr>
+<tr><td>_escape</td></tr><tr><td>_escape_map</td></tr><tr><td>_uescape</td></tr><tr><td>_uunescape</td></tr><tr><td>coding_regexps</td></tr><tr><td>configDir</td></tr><tr><td>supportedCodecs</td></tr>
 </table>
 <h3>Classes</h3>
 <table>
@@ -52,12 +52,12 @@
 <td><a href="#compile">compile</a></td>
 <td>Function to compile one Python source file to Python bytecode.</td>
 </tr><tr>
+<td><a href="#compile_extern">compile_extern</a></td>
+<td>Function to compile one Python source file to Python bytecode.</td>
+</tr><tr>
 <td><a href="#convertLineEnds">convertLineEnds</a></td>
 <td>Function to convert the end of line characters.</td>
 </tr><tr>
-<td><a href="#decode">decode</a></td>
-<td>Function to decode some byte text into a string.</td>
-</tr><tr>
 <td><a href="#decodeBytes">decodeBytes</a></td>
 <td>Function to decode some byte text into a string.</td>
 </tr><tr>
@@ -82,9 +82,6 @@
 <td><a href="#extractFlagsFromFile">extractFlagsFromFile</a></td>
 <td>Function to extract eric specific flags out of the given file.</td>
 </tr><tr>
-<td><a href="#extractLineFlags">extractLineFlags</a></td>
-<td>Function to extract flags starting and ending with '__' from a line comment.</td>
-</tr><tr>
 <td><a href="#fromNativeSeparators">fromNativeSeparators</a></td>
 <td>Function returning a path, that is using "/" separator characters.</td>
 </tr><tr>
@@ -145,9 +142,6 @@
 <td><a href="#get_coding">get_coding</a></td>
 <td>Function to get the coding of a text.</td>
 </tr><tr>
-<td><a href="#get_codingBytes">get_codingBytes</a></td>
-<td>Function to get the coding of a bytes text.</td>
-</tr><tr>
 <td><a href="#hasEnvironmentEntry">hasEnvironmentEntry</a></td>
 <td>Module function to check, if the environment contains an entry.</td>
 </tr><tr>
@@ -199,12 +193,6 @@
 <td><a href="#prepareQtMacBundle">prepareQtMacBundle</a></td>
 <td>Module function for starting Qt tools that are Mac OS X bundles.</td>
 </tr><tr>
-<td><a href="#py2compile">py2compile</a></td>
-<td>Function to compile one Python 2 source file to Python 2 bytecode.</td>
-</tr><tr>
-<td><a href="#readEncodedFile">readEncodedFile</a></td>
-<td>Function to read a file and decode it's contents into proper text.</td>
-</tr><tr>
 <td><a href="#readEncodedFileWithHash">readEncodedFileWithHash</a></td>
 <td>Function to read a file, calculate a hash value and decode it's contents into proper text.</td>
 </tr><tr>
@@ -214,6 +202,9 @@
 <td><a href="#relpath">relpath</a></td>
 <td>Return a relative version of a path.</td>
 </tr><tr>
+<td><a href="#samefilepath">samefilepath</a></td>
+<td>Function to compare two paths.</td>
+</tr><tr>
 <td><a href="#samepath">samepath</a></td>
 <td>Function to compare two paths.</td>
 </tr><tr>
@@ -394,7 +385,7 @@
 <hr /><hr />
 <a NAME="compile" ID="compile"></a>
 <h2>compile</h2>
-<b>compile</b>(<i>file, codestring=""</i>)
+<b>compile</b>(<i>file, codestring="", isPy2=False</i>)
 <p>
     Function to compile one Python source file to Python bytecode.
 </p><dl>
@@ -404,6 +395,9 @@
 </dd><dt><i>codestring</i></dt>
 <dd>
 string containing the code to compile (string)
+</dd><dt><i>isPy2</i></dt>
+<dd>
+shows which interperter to use (boolean)
 </dd>
 </dl><dl>
 <dt>Returns:</dt>
@@ -416,6 +410,33 @@
 </dl>
 <div align="right"><a href="#top">Up</a></div>
 <hr /><hr />
+<a NAME="compile_extern" ID="compile_extern"></a>
+<h2>compile_extern</h2>
+<b>compile_extern</b>(<i>file, isPy2, checkFlakes=True, ignoreStarImportWarnings=False</i>)
+<p>
+    Function to compile one Python source file to Python bytecode.
+</p><dl>
+<dt><i>file</i></dt>
+<dd>
+source filename (string)
+</dd><dt><i>checkFlakes=</i></dt>
+<dd>
+flag indicating to do a pyflakes check (boolean)
+</dd>
+</dl><dl>
+<dt>Returns:</dt>
+<dd>
+A tuple indicating status (True = an error was found), the
+        file name, the line number, the index number, the code string,
+        the error message and a list of tuples of pyflakes warnings indicating
+        file name, line number and message (boolean, string, string, string,
+        string, string, list of (string, string, string)). The syntax error
+        values are only valid, if the status is True. The pyflakes list will
+        be empty, if a syntax error was detected by the syntax checker.
+</dd>
+</dl>
+<div align="right"><a href="#top">Up</a></div>
+<hr /><hr />
 <a NAME="convertLineEnds" ID="convertLineEnds"></a>
 <h2>convertLineEnds</h2>
 <b>convertLineEnds</b>(<i>text, eol</i>)
@@ -437,24 +458,6 @@
 </dl>
 <div align="right"><a href="#top">Up</a></div>
 <hr /><hr />
-<a NAME="decode" ID="decode"></a>
-<h2>decode</h2>
-<b>decode</b>(<i>text</i>)
-<p>
-    Function to decode some byte text into a string.
-</p><dl>
-<dt><i>text</i></dt>
-<dd>
-byte text to decode (bytes)
-</dd>
-</dl><dl>
-<dt>Returns:</dt>
-<dd>
-tuple of decoded text and encoding (string, string)
-</dd>
-</dl>
-<div align="right"><a href="#top">Up</a></div>
-<hr /><hr />
 <a NAME="decodeBytes" ID="decodeBytes"></a>
 <h2>decodeBytes</h2>
 <b>decodeBytes</b>(<i>buffer</i>)
@@ -627,30 +630,6 @@
 </dl>
 <div align="right"><a href="#top">Up</a></div>
 <hr /><hr />
-<a NAME="extractLineFlags" ID="extractLineFlags"></a>
-<h2>extractLineFlags</h2>
-<b>extractLineFlags</b>(<i>line, startComment="</i>)
-<p>
-    Function to extract flags starting and ending with '__' from a line comment.
-</p><dl>
-<dt><i>line</i></dt>
-<dd>
-line to extract flags from (string)
-</dd><dt><i>startComment=</i></dt>
-<dd>
-string identifying the start of the comment (string)
-</dd><dt><i>endComment=</i></dt>
-<dd>
-string identifying the end of a comment (string)
-</dd>
-</dl><dl>
-<dt>Returns:</dt>
-<dd>
-list containing the extracted flags (list of strings)
-</dd>
-</dl>
-<div align="right"><a href="#top">Up</a></div>
-<hr /><hr />
 <a NAME="fromNativeSeparators" ID="fromNativeSeparators"></a>
 <h2>fromNativeSeparators</h2>
 <b>fromNativeSeparators</b>(<i>path</i>)
@@ -989,24 +968,6 @@
 </dl>
 <div align="right"><a href="#top">Up</a></div>
 <hr /><hr />
-<a NAME="get_codingBytes" ID="get_codingBytes"></a>
-<h2>get_codingBytes</h2>
-<b>get_codingBytes</b>(<i>text</i>)
-<p>
-    Function to get the coding of a bytes text.
-</p><dl>
-<dt><i>text</i></dt>
-<dd>
-bytes text to inspect (bytes)
-</dd>
-</dl><dl>
-<dt>Returns:</dt>
-<dd>
-coding string
-</dd>
-</dl>
-<div align="right"><a href="#top">Up</a></div>
-<hr /><hr />
 <a NAME="hasEnvironmentEntry" ID="hasEnvironmentEntry"></a>
 <h2>hasEnvironmentEntry</h2>
 <b>hasEnvironmentEntry</b>(<i>key</i>)
@@ -1340,51 +1301,6 @@
 </dl>
 <div align="right"><a href="#top">Up</a></div>
 <hr /><hr />
-<a NAME="py2compile" ID="py2compile"></a>
-<h2>py2compile</h2>
-<b>py2compile</b>(<i>file, checkFlakes=False</i>)
-<p>
-    Function to compile one Python 2 source file to Python 2 bytecode.
-</p><dl>
-<dt><i>file</i></dt>
-<dd>
-source filename (string)
-</dd><dt><i>checkFlakes=</i></dt>
-<dd>
-flag indicating to do a pyflakes check (boolean)
-</dd>
-</dl><dl>
-<dt>Returns:</dt>
-<dd>
-A tuple indicating status (True = an error was found), the
-        file name, the line number, the index number, the code string,
-        the error message and a list of tuples of pyflakes warnings indicating
-        file name, line number and message (boolean, string, string, string,
-        string, string, list of (string, string, string)). The syntax error
-        values are only valid, if the status is True. The pyflakes list will
-        be empty, if a syntax error was detected by the syntax checker.
-</dd>
-</dl>
-<div align="right"><a href="#top">Up</a></div>
-<hr /><hr />
-<a NAME="readEncodedFile" ID="readEncodedFile"></a>
-<h2>readEncodedFile</h2>
-<b>readEncodedFile</b>(<i>filename</i>)
-<p>
-    Function to read a file and decode it's contents into proper text.
-</p><dl>
-<dt><i>filename</i></dt>
-<dd>
-name of the file to read (string)
-</dd>
-</dl><dl>
-<dt>Returns:</dt>
-<dd>
-tuple of decoded text and encoding (string, string)
-</dd>
-</dl>
-<div align="right"><a href="#top">Up</a></div>
-<hr /><hr />
 <a NAME="readEncodedFileWithHash" ID="readEncodedFileWithHash"></a>
 <h2>readEncodedFileWithHash</h2>
 <b>readEncodedFileWithHash</b>(<i>filename</i>)
@@ -1438,6 +1354,28 @@
 </dl>
 <div align="right"><a href="#top">Up</a></div>
 <hr /><hr />
+<a NAME="samefilepath" ID="samefilepath"></a>
+<h2>samefilepath</h2>
+<b>samefilepath</b>(<i>f1, f2</i>)
+<p>
+    Function to compare two paths. Strips the filename.
+</p><dl>
+<dt><i>f1</i></dt>
+<dd>
+first filepath for the compare (string)
+</dd><dt><i>f2</i></dt>
+<dd>
+second filepath for the compare (string)
+</dd>
+</dl><dl>
+<dt>Returns:</dt>
+<dd>
+flag indicating whether the two paths represent the
+        same path on disk.
+</dd>
+</dl>
+<div align="right"><a href="#top">Up</a></div>
+<hr /><hr />
 <a NAME="samepath" ID="samepath"></a>
 <h2>samepath</h2>
 <b>samepath</b>(<i>f1, f2</i>)

eric ide

mercurial