I am developping a GUI with tkinter and I binded this function to a button b. Once I click the button, the file is opened in notepad++ , the main problem is that I can t do anything with the GUI (no response while notepad is opened). Once I close Notepad++, I am again able to click on buttons in the GUI. In other words, this call of open_notepad doesn t come to an end. I want to have access to the GUI even if notepad is opened (open_notepad is called)
def open_notepad(file,line):
subprocess.call([
r"C:\Program Files\Notepad++\notepad++.exe",
"-n",line,file
])
print(line)
notepad_button = Button(root, text="open notepad")
notepad_button.bind("<Button-1>", lambda event: open_notepad(file_init, line))notepad.pack()