[Python] How does IDLE execute files? [closed]

Discussão em 'Python' iniciado por Stack, Julho 3, 2025.

  1. Stack

    Stack Membro Participativo

    I tried to make an IDE myself using the tkinter module, but had a lot of problems.

    Sure, exec() works, but the traceback in IDLE shows the code line that triggered the error, unlike exec(). I tried subprocess.run() and subprocess.Popen() with the help of ChatGPT, but I ran into many issues. I have tried to look at the IDLE source code to try to understand, but couldn't.

    Could somebody provide a code sample/snippet (preferably from/similar to IDLE's source code) on how IDLE executes its files? Or at least like in other IDEs. And I would really appreciate it being implemented with a text widget (tkinter.Text).

    Continue reading...

Compartilhe esta Página