"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "modules/pmg_qt/mimic_tk.py" between
pymol-v2.1.0.tar.bz2 and pymol-open-source-2.2.0.tar.gz

About: PyMOL is a Python-enhanced molecular graphics tool. It excels at 3D visualization of proteins, small molecules, density, surfaces, and trajectories. It also includes molecular editing, ray tracing, and movies. Open Source version.

mimic_tk.py  (pymol-v2.1.0.tar.bz2):mimic_tk.py  (pymol-open-source-2.2.0)
skipping to change at line 101 skipping to change at line 101
self._getfilter(options.get('filetypes', '')))[0] self._getfilter(options.get('filetypes', '')))[0]
def askopenfilenames(self, **options): def askopenfilenames(self, **options):
options['multiple'] = 1 options['multiple'] = 1
return self.askopenfilename(**options) return self.askopenfilename(**options)
def askopenfile(self, mode='r', **options): def askopenfile(self, mode='r', **options):
r = self.askopenfilename(**options) r = self.askopenfilename(**options)
if options.get('multiple'): if options.get('multiple'):
return [open(f, mode) for f in r] return [open(f, mode) for f in r]
if not r:
return None
return open(r, mode) return open(r, mode)
def askopenfiles(self, **options): def askopenfiles(self, **options):
options['multiple'] = 1 options['multiple'] = 1
return self.askopenfile(**options) return self.askopenfile(**options)
def asksaveasfilename(self, **options): def asksaveasfilename(self, **options):
return QtWidgets.QFileDialog.getSaveFileName(None, return QtWidgets.QFileDialog.getSaveFileName(None,
options.get('title', ''), options.get('title', ''),
options.get('initialdir', ''), options.get('initialdir', ''),
self._getfilter(options.get('filetypes', '')))[0] self._getfilter(options.get('filetypes', '')))[0]
def asksaveasfile(self, mode='w', **options): def asksaveasfile(self, mode='w', **options):
r = self.asksaveasfilename(**options) r = self.asksaveasfilename(**options)
if not r:
return None
return open(r, mode) return open(r, mode)
def askdirectory(self, **options): def askdirectory(self, **options):
return QtWidgets.QFileDialog.getExistingDirectory(None, return QtWidgets.QFileDialog.getExistingDirectory(None,
options.get('title', ''), options.get('title', ''),
options.get('initialdir', '')) options.get('initialdir', ''))
if sys.version_info[0] < 3: if sys.version_info[0] < 3:
sys.modules['tkMessageBox'] = _qtMessageBox() sys.modules['tkMessageBox'] = _qtMessageBox()
sys.modules['tkFileDialog'] = _qtFileDialog() sys.modules['tkFileDialog'] = _qtFileDialog()
 End of changes. 2 change blocks. 
0 lines changed or deleted 4 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)