0

I am having an issue with my execfile function.

What i would like to do is open a new file upon the click of a menu item as shown underneath. The issue however, is that when the file opens, some of its contents opens up in the window where the original menu item exists and the rest of the file opens up in a separate window.

It should all open up in a separate window and not half-here, half-there! Where am i going wrong?

def search():
   execfile("grid2.py")

editmenu.add_separator()

editmenu.add_command(label="Research", command=search)

The file grid2.py should open up just like it does when I use the run module in IDLE.

zachary
  • 3
  • 6

0 Answers0