code.InteractiveInterpreter.showsyntaxerror()

InteractiveInterpreter.showsyntaxerror(filename=None)

Display the syntax error that just occurred. This does not display a stack trace because there isn’t one for syntax errors. If filename is given, it is stuffed into the exception instead of the default filename provided by Python’s parser, because it always uses '<string>' when reading from a string. The output is written by the write() method.

doc_python
2016-10-07 17:28:36
Comments
Leave a Comment

Please login to continue.