From: Paul RASCLE Date: Wed, 17 Oct 2018 13:49:32 +0000 (+0200) Subject: fiche #17915 ajout automatique de .py dans le nom du script genéré par generate_interpolz X-Git-Tag: HYDRO_V2_0_0^2~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=28246d841f87d79efadc0a7ec8384d15fdaadd5d;p=modules%2Fhydrosolver.git fiche #17915 ajout automatique de .py dans le nom du script genéré par generate_interpolz --- 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 ):