From 28246d841f87d79efadc0a7ec8384d15fdaadd5d Mon Sep 17 00:00:00 2001 From: Paul RASCLE Date: Wed, 17 Oct 2018 15:49:32 +0200 Subject: [PATCH] =?utf8?q?fiche=20#17915=20ajout=20automatique=20de=20.py?= =?utf8?q?=20dans=20le=20nom=20du=20script=20gen=C3=A9r=C3=A9=20par=20gene?= =?utf8?q?rate=5Finterpolz?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/salome_hydro/interpolz_gui.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/salome_hydro/interpolz_gui.py b/src/salome_hydro/interpolz_gui.py index 54402a8..d01a043 100644 --- a/src/salome_hydro/interpolz_gui.py +++ b/src/salome_hydro/interpolz_gui.py @@ -1,5 +1,6 @@ import sys, os +import string #sys.path.append(os.path.join(os.environ['MEDFILE_ROOT_DIR'], 'lib/python2.7/site-packages/med')) #sys.path.append(os.path.join(os.environ['MEDFICHIER_INSTALL_DIR'], 'lib/python2.7/site-packages/med')) hydro_solver_root = os.path.join(os.environ['HYDROSOLVER_ROOT_DIR'], 'lib', 'python2.7', 'site-packages', 'salome', 'salome', 'hydro') @@ -115,6 +116,8 @@ class InterpolzDlg( QDialog ): mask = "*.py" fname, filt = QFileDialog.getSaveFileName( self, caption, ".", mask ) if fname!=None and fname!="": + if string.split(fname, '.')[-1] != 'py': + fname += '.py' self.OutputPath.setText( fname ) def onMEDFile( self ): -- 2.39.2