[Python] How can i make error highlighter for python IDE

Discussão em 'Python' iniciado por Stack, Junho 5, 2025.

  1. Stack

    Stack Membro Participativo

    I’m currently building a simple Python IDE using Python and PyQt6. So far, I’ve implemented syntax highlighting and basic auto-completion features.

    Now, I want to add real-time syntax error highlighting — similar to how most modern IDEs underline code with syntax errors as you type. I’m not sure which Python library or tool would be best for this.

    I’ve heard about tools like Pylint and Pylance, but I couldn’t find any clear documentation or examples showing how to use them for real-time syntax checking in a GUI application. Most of what I’ve found is about running them from the command line or integrating with VSCode

    Also i have tried: I looked into using pylint, but the documentation doesn’t show how to extract errors from a code string directly.

    I also explored ast and compile() for basic syntax checking, but I’m unsure how to extract line/column info and types of errors for highlighting.

    Any suggestions, libraries, or code examples would be really helpful

    Continue reading...

Compartilhe esta Página