From: Pascale Noyret Date: Mon, 28 Nov 2011 10:04:04 +0000 (+0000) Subject: ajout Carmel3D + chagt getcwd par __file__ X-Git-Tag: LOGILAB~265 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=7ea7c581f0f9afe84461f951a8043d1873c34bf5;p=tools%2Feficas.git ajout Carmel3D + chagt getcwd par __file__ --- 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()