eric5.UtilitiesPython2.Py2SyntaxChecker

Module implementing the syntax check for Python 2.

Global Attributes

None

Classes

None

Functions

compile Function to compile one Python source file to Python bytecode.
flakesCheck Function to perform a pyflakes check.


compile

compile(file, codestring)

Function to compile one Python source file to Python bytecode.

file
source filename (string)
codestring
source code (string)
Returns:
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). The values are only valid, if the status equals 1.
Up


flakesCheck

flakesCheck(fileName, codestring, ignoreStarImportWarnings)

Function to perform a pyflakes check.

fileName
name of the file (string)
codestring
source code to be checked (string)
ignoreStarImportWarnings
flag indicating to ignore 'star import' warnings (boolean)
Returns:
list of strings containing the warnings (marker, file name, line number, message)
Up