From: Paul RASCLE Date: Fri, 8 Nov 2019 09:12:40 +0000 (+0100) Subject: fix dialogues assignStrickler et generate Interpolz X-Git-Tag: SH_V2_2_0~27^2~3 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ac90a5e4c8704774aa03ab7add443e97a43d55a7;p=modules%2Fhydrosolver.git fix dialogues assignStrickler et generate Interpolz --- diff --git a/src/salome_hydro/assignStrickler_gui.py b/src/salome_hydro/assignStrickler_gui.py index 82a31e2..dd4f093 100644 --- a/src/salome_hydro/assignStrickler_gui.py +++ b/src/salome_hydro/assignStrickler_gui.py @@ -60,9 +60,11 @@ class assignStricklerDlg( QDialog ): def onOutputFile( self ): caption = "Python file" mask = "*.py" - fname, filt = QFileDialog.getSaveFileName( self, caption, ".", mask ) + theDir="." + fname, filt = QFileDialog.getSaveFileName( self, caption, theDir, mask ) + #print("fname: %s"%fname) if fname!=None and fname!="": - if string.split(fname, '.')[-1] != 'py': + if fname.split('.')[-1] != 'py': fname += '.py' self.OutputPath.setText( fname ) diff --git a/src/salome_hydro/interpolz_gui.py b/src/salome_hydro/interpolz_gui.py index 742b291..a1021c6 100644 --- a/src/salome_hydro/interpolz_gui.py +++ b/src/salome_hydro/interpolz_gui.py @@ -137,7 +137,7 @@ class InterpolzDlg( QDialog ): mask = "*.py" fname, filt = QFileDialog.getSaveFileName( self, caption, ".", mask ) if fname!=None and fname!="": - if string.split(fname, '.')[-1] != 'py': + if fname.split('.')[-1] != 'py': fname += '.py' self.OutputPath.setText( fname )