Documentation/Source/eric5.Utilities.SyntaxCheck.html

branch
Py2 comp.
changeset 2571
e6bb19eb87ea
child 3066
76a310bc7bba
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Documentation/Source/eric5.Utilities.SyntaxCheck.html	Mon Apr 08 07:52:06 2013 +0200
@@ -0,0 +1,187 @@
+<!DOCTYPE html>
+<html><head>
+<title>eric5.Utilities.SyntaxCheck</title>
+<meta charset="UTF-8">
+<style>
+body {
+    background: #EDECE6;
+    margin: 0em 1em 10em 1em;
+    color: black;
+}
+
+h1 { color: white; background: #85774A; }
+h2 { color: white; background: #85774A; }
+h3 { color: white; background: #9D936E; }
+h4 { color: white; background: #9D936E; }
+    
+a { color: #BA6D36; }
+
+</style>
+</head>
+<body><a NAME="top" ID="top"></a>
+<h1>eric5.Utilities.SyntaxCheck</h1>
+<p>
+Module implementing the syntax check for Python 2/3.
+</p>
+<h3>Global Attributes</h3>
+<table>
+<tr><td>codingBytes_regexps</td></tr>
+</table>
+<h3>Classes</h3>
+<table>
+<tr><td>None</td></tr>
+</table>
+<h3>Functions</h3>
+<table>
+<tr>
+<td><a href="#compile_and_check">compile_and_check</a></td>
+<td>Function to compile one Python source file to Python bytecode and to perform a pyflakes check.</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="#extractLineFlags">extractLineFlags</a></td>
+<td>Function to extract flags starting and ending with '__' from a line comment.</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="#normalizeCode">normalizeCode</a></td>
+<td>Function to normalize the given code.</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>
+</table>
+<hr /><hr />
+<a NAME="compile_and_check" ID="compile_and_check"></a>
+<h2>compile_and_check</h2>
+<b>compile_and_check</b>(<i>file_, codestring="", checkFlakes=True, ignoreStarImportWarnings=False</i>)
+<p>
+    Function to compile one Python source file to Python bytecode
+    and to perform a pyflakes check.
+</p><dl>
+<dt><i>file_</i></dt>
+<dd>
+source filename (string)
+</dd><dt><i>codestring</i></dt>
+<dd>
+string containing the code to compile (string)
+</dd><dt><i>checkFlakes=</i></dt>
+<dd>
+flag indicating to do a pyflakes check (boolean)
+</dd><dt><i>ignoreStarImportWarnings=</i></dt>
+<dd>
+flag indicating to
+        ignore 'star import' warnings (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
+        and the error message (boolean, string, string, string, string,
+        string). If checkFlakes is True, a list of strings containing the
+        warnings (marker, file name, line number, message)
+        The values are only valid, if the status is True.
+</dd>
+</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="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="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="normalizeCode" ID="normalizeCode"></a>
+<h2>normalizeCode</h2>
+<b>normalizeCode</b>(<i>codestring</i>)
+<p>
+    Function to normalize the given code.
+</p><dl>
+<dt><i>codestring</i></dt>
+<dd>
+code to be normalized (string)
+</dd>
+</dl><dl>
+<dt>Returns:</dt>
+<dd>
+normalized code (string)
+</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 />
+</body></html>
\ No newline at end of file

eric ide

mercurial