PyDocs

Nav

Custom Python Interpreters

InteractiveInterpreter.showsyntaxerror

  • InteractiveInterpreter.showsyntaxerror(filename=None)
Display the syntax error that just occurred.

This doesn't display a stack trace because there isn't one.

If a filename is given, it is stuffed in the exception instead
of what was there before (because Python's parser always uses
"<string>" when reading from a string).

The output is written by self.write(), below.
0 Examples
No examples for code/InteractiveInterpreter.showsyntaxerror.
See Also
No see-alsos for code/InteractiveInterpreter.showsyntaxerror
0 Notes
No notes for InteractiveInterpreter.showsyntaxerror