Is it possible to implement automatic error highlighting for Python?

584 Views Asked by At

Are there any IDEs for Python that support automatic error highlighting (like the Eclipse IDE for Java?) I think it would be a useful feature for a Python IDE, since it would make it easier to find syntax errors. Even if such an editor did not exist, it still might be possible to implement this by automatically running the Python script every few seconds, and then parsing the console output for error messages.

4

There are 4 best solutions below

0
Joran Beasley On

eclipse+pydev

pycharm

many others ....

3
AudioBubble On

If you use VIM or don't have a problem with it, try this extension. https://github.com/klen/python-mode

This is for Emacs as well: https://github.com/gabrielelanaro/emacs-for-python

Also pycharm and eclipse with pydev work fine.

0
Thorsten Kranz On

If I don't use vim I really enjoy spyder. It is easy to use and has some really nice features, like integrated debugging and profiling, graphical variable explorer and object inspector. The latter shows, e.g., the integrated documentation for every function of class you use.

0
Don Kirkby On

I built an extension to Eclipse and PyDev that does what you describe, it runs the Python code as you're typing, and displays all the variable values and any exceptions that occur. It's called Live Coding in Python, and the web site has a tutorial and a demo video.

PyDev can highlight some problems in your code by analysing it, and Live Coding in Python can show you problems that happen when you run it.