spe2fitsGUI.py 文件源码

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

项目:spe2fits 作者: jerryjiahaha 项目源码 文件源码
def chooseDialogFiles(self):
        filenames = filedialog.askopenfilenames(
                defaultextension = '.SPE',
                filetypes = [('WinViewer Documents', '.SPE'), ('all files', '.*'),],
                parent = self,
                title = "Select .SPE files",
                multiple = True,
                )
        print(filenames)
        if len(filenames) == 0:
            return
        self.chooseFilePath = os.path.dirname(
                os.path.realpath(filenames[0])
                )
        print("select:", self.chooseFilePath)
        self.chooseFileOutDir = filedialog.askdirectory(
                initialdir = self.chooseFilePath,
                parent = self,
                title = "Select output Directory",
                mustexist = False,
                )
        print("out:", self.chooseFileOutDir)
        if not self.checkDir(self.chooseFileOutDir):
            return
        self.convertFiles(filenames, self.chooseFileOutDir)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号