pieface_gui.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:PIEFACE 作者: jcumby 项目源码 文件源码
def openfiles(self):
        """ Open dialog for selecting CIF files"""
        options = {}
        options['initialdir'] = '{0}'.format(os.path.expanduser('~'))
        options['filetypes'] = [('all files', '.*'), ('CIF files', '.cif')]
        options['title'] = 'CIF files for processing'
        options['defaultextension'] = '.cif'
        filenames = tkFileDialog.askopenfilenames(parent=self.parent, **options)

        filelist = self.parent.tk.splitlist(filenames)

        for file in filelist:
            if os.path.normpath(file) not in self.filenames:
                self.filenames.append(os.path.normpath(file))
                self.filebox.insert(tk.END, os.path.basename(file) )
        if len(self.filenames) > 0:
            self.clearbutton.configure(state='normal')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号