def asksaveasfilename(self):
if not self.parent.filename:
self.parent.set_info_box(message='Error: No figure has been created yet.')
else:
file_options = {}
file_options['initialdir'] = self.parent.par.run.out_dir
file_options['initialfile'] = re.sub('/.+/', '', self.parent.filename)
file_options['filetypes'] = [('pdf files', '.pdf')]
file_options['parent'] = self.parent
file_options['title'] = 'save figure as'
filename = tkFileDialog.askdirectory(**file_options)
if filename:
copyfile(self.parent.filename, filename)
评论列表
文章目录