P
Peter Kleiweg
I have a program with these fragments:
from Tkinter import *
import tkFileDialog
import tkMessageBox
def openProject():
filepath = tkFileDialog.askopenfilename(filetypes=(("project files","*.ini"), ("all","*")))
if filepath:
loadProject(filepath)
def makeClean():
if tkMessageBox.askyesno('Make clean', 'Remove all files created by Make?'):
print 'yes'
# more code
If I call makeClean(), I get the yes/no box. If I click 'yes',
it prints 'yes', unless I have called openProject() sometimes
earlier. In the latter case, none of the code following the
askyesno gets executed, whether I click 'yes' or 'no'. It also
happens when I have called openProject() earlier and clicked
'Cancel'.
This error happens on one Linux machine ([GCC 3.3.1 (SuSE
Linux)] on linux2), but not on another ([GCC 2.95.3 20010315
(SuSE)] on linux2). Both have Python 2.3.4. It works fine on
Windows98 with Python 2.4
Anyone any idea what is going on?
from Tkinter import *
import tkFileDialog
import tkMessageBox
def openProject():
filepath = tkFileDialog.askopenfilename(filetypes=(("project files","*.ini"), ("all","*")))
if filepath:
loadProject(filepath)
def makeClean():
if tkMessageBox.askyesno('Make clean', 'Remove all files created by Make?'):
print 'yes'
# more code
If I call makeClean(), I get the yes/no box. If I click 'yes',
it prints 'yes', unless I have called openProject() sometimes
earlier. In the latter case, none of the code following the
askyesno gets executed, whether I click 'yes' or 'no'. It also
happens when I have called openProject() earlier and clicked
'Cancel'.
This error happens on one Linux machine ([GCC 3.3.1 (SuSE
Linux)] on linux2), but not on another ([GCC 2.95.3 20010315
(SuSE)] on linux2). Both have Python 2.3.4. It works fine on
Windows98 with Python 2.4
Anyone any idea what is going on?