with ActiveTcl8.5.14 and Python 2.7, what are good online resources?
I am trying to write my first program using Tkinter and python 2.7. The
Tkinter library I have installed is: ActiveTcl8.5.14. My question is: What
is a good online resource for this combination? I have been making
progress by trial and error, but now I'm stuck. I'm trying to set a
stringVar to a file name. But I'm concerned that I'm using code that is
for the wrong version of Python or Tkinter.
def abrir_capitulo():
##Dialog box for selecting the chapter to be loaded.
import tkFileDialog
WORDLIST_FILENAME =
tkFileDialog.askopenfilename(mode='r',parent=master,title="Archivo
para abrir")
This is the traceback:
Exception in Tkinter callback
Traceback (most recent call last):
File
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk/Tkinter.py",
line 1470, in __call__
return self.func(*args)
File "/Users/Noel/Documents/Professional Development/MIT CS 6.0/Recall
Game/Recall_Game.py", line 103, in abrir_capitulo
WORDLIST_FILENAME =
tkFileDialog.askopenfilename(mode='r',parent=master,title="Archivo
para abrir")
File
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk/tkFileDialog.py",
line 125, in askopenfilename
return Open(**options).show()
File
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk/tkCommonDialog.py",
line 48, in show
s = w.tk.call(self.command, *w._options(self.options))
TclError: bad option "-mode": must be -defaultextension, -filetypes,
-initialdir, -initialfile, -message, -multiple, -parent, -title,
-typevariable, or -command
No comments:
Post a Comment