I am trying to make a python idle using tkinter ,I am almost done but I am facing this issue:
I am using subprocess module to run the code which user has written but i am trying to use the input statement the program is crashing and I do not know why
This is the code which is running the program:-
def run():
if file_path=="":
save_prompt=Toplevel()
text=Label(save_prompt,text='Please save your code!!',height=10,width=20)
save_prompt.iconphoto(False, photo)
text.pack()
return
command=f"python {file_path}"
process=subprocess.Popen(command,stdout=subprocess.PIPE,stderr=subprocess.PIPE,shell=True)
output,error=process.communicate()
code_output.delete("1.0",END)
code_output.insert('1.0',output)
code_output.insert("1.0",error)
What I have tried:
I have tried visiting many sites and also tried changing my code but nothing is working. Please help