Salome HOME
legere difference ds VARIABLES_TO_BE...
[tools/eficas.git] / Sep / prefs.py
1 # -*- coding: utf-8 -*-
2 # Copyright (C) 2007-2012   EDF R&D
3 #
4 # This library is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU Lesser General Public
6 # License as published by the Free Software Foundation; either
7 # version 2.1 of the License.
8 #
9 # This library is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12 # Lesser General Public License for more details.
13 #
14 # You should have received a copy of the GNU Lesser General Public
15 # License along with this library; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
17 #
18 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 #
20 import os,sys
21
22 # repIni sert à localiser le fichier editeur.ini
23 # Obligatoire
24 repIni=os.path.dirname(os.path.abspath(__file__))
25
26 # INSTALLDIR sert à localiser l'installation d'Eficas
27 # Obligatoire
28 INSTALLDIR=os.path.join(repIni,'..')
29
30 # CODE_PATH sert à localiser Noyau et Validation éventuellement
31 # non contenus dans la distribution EFICAS
32 # Par défaut on utilise les modules de INSTALLDIR
33 # Peut valoir None (defaut)
34 CODE_PATH = None
35
36 # la variable code donne le nom du code a selectionner
37 code="SEP" 
38
39 # lang indique la langue utilisée pour les chaines d'aide : fr ou ang
40 lang='fr'
41
42 # Codage des strings qui accepte les accents (en remplacement de 'ascii')
43 encoding='iso-8859-1'
44
45
46 EditeurDir=INSTALLDIR+"/Editeur"
47 sys.path.insert(0,INSTALLDIR)
48
49 ICONDIR=os.path.join(INSTALLDIR,'Editeur','icons')
50
51 # Preference
52 if os.name == 'nt':
53    userprefs = os.sep.join( [ os.environ['HOMEDRIVE'], os.environ['HOMEPATH'], 'Eficas_install', 'prefs.py' ])
54 else :
55    userprefs=os.path.expanduser("~/.Eficas_SEP/prefs.py")
56
57 if os.path.isfile(userprefs):
58    try:
59       execfile(userprefs)
60    except:
61       pass
62