From 7ea7c581f0f9afe84461f951a8043d1873c34bf5 Mon Sep 17 00:00:00 2001 From: Pascale Noyret Date: Mon, 28 Nov 2011 10:04:04 +0000 Subject: [PATCH] ajout Carmel3D + chagt getcwd par __file__ --- InterfaceQT4/monChoixCode.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/InterfaceQT4/monChoixCode.py b/InterfaceQT4/monChoixCode.py index 3e876dd1..0a81b985 100644 --- a/InterfaceQT4/monChoixCode.py +++ b/InterfaceQT4/monChoixCode.py @@ -47,10 +47,11 @@ class MonChoixCode(Ui_ChoixCode,QDialog): def verifieInstall(self): self.groupCodes=QButtonGroup(self) - for code in ('Aster','Cuve2dg','MAP','Openturns_Study','Openturns_Wrapper','Carmel3D'): + for code in ('Aster','Cuve2dg','Openturns_Study','Openturns_Wrapper','Carmel3D'): nom='rB_'+code bouton=getattr(self,nom) - dirCode=os.path.abspath(os.path.join(os.getcwd(),'..',code)) + dirCode=os.path.abspath(os.path.join(os.path.abspath(__file__),'../..',code)) + print dirCode try : l=os.listdir(dirCode) self.groupCodes.addButton(bouton) @@ -63,5 +64,5 @@ class MonChoixCode(Ui_ChoixCode,QDialog): code=str(bouton.text()) codeUpper=code.upper() self.parentAppli.code=codeUpper - sys.path.insert(0,os.path.abspath(os.path.join(os.getcwd(),'..',code))) + sys.path.insert(0,os.path.abspath(os.path.join(os.path.abspath(__file__),'../..',code))) self.close() -- 2.39.2