具体代码如下,求大神帮忙:
class ArtCheck(object):
def _init_(self):
self._top=Tk()
self._f_dir=Fram(self._top,width=100)
self._cwd=StringVar(self._top)
Entry(self._f_dir,width=100,textvarible=self._cwd)
Button(self._f_dir,command=self.findDir)
def findDir(self):
root=Tk()
root.withdraw()
dirname=tkFileDialog.askdirectory(parent=root,initialdir='/',title=('选择路径'))
self.cwd.set(dirname)
if _name_=='_main':
artobject=ArtCheck()
mainloop()