Is there any way to integrate IDLE into a Tkinter program as a widget? I have searched google for quite a while and have not come up with anything. Even a point in the right direction would be great. Thank you in advance for your replies.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Not sure how to do it, but you have the python idlelib library (in PythonXX/Lib/idlelib). Documentation is scarce but I found some people using classes from there. Main idle module in the library I think is pyshell (idle.py calls pyshell). You could start from there…
If as indicated in a comment you want to embed an interpreter shell into a tkinter program and you dont require the shell to be idle, you could embed an IPython shell. IPython gives you very nice tools. There is at least a tkinter application that embeds ipython. Here you have the code.
Update:
The above link to the ipython wiki is currently broken.
You can find the code in josePhoenix github repository (see comment below)