Debian Codegraph @

wxgeometrie/param/__init__.py

raw symbols SCIP
1 # -*- coding: utf-8 -*-
2
3 ######################################
4 #
5 # Paramètres du programme
6 #
7 ######################################
8 #
9 # WxGeometrie
10 # Dynamic geometry, graph plotter, and more for french mathematic teachers.
11 # Copyright (C) 2005-2013 Nicolas Pourcelot
12 #
13 # This program is free software; you can redistribute it and/or modify
14 # it under the terms of the GNU General Public License as published by
15 # the Free Software Foundation; either version 2 of the License, or
16 # (at your option) any later version.
17 #
18 # This program is distributed in the hope that it will be useful,
19 # but WITHOUT ANY WARRANTY; without even the implied warranty of
20 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 # GNU General Public License for more details.
22 #
23 # You should have received a copy of the GNU General Public License
24 # along with this program; if not, write to the Free Software
25 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
26 #
27 ######################################
28
29 from time import mktime
30 import sys, platform, os
31
32 from ..version import version, date_version, NOMPROG, NOMPROG2
33 from ..dependances import dependances, latex, latex_unicode, moteur_de_rendu, \
34 python_version_min, python_version_max, plateforme
35 from .modules import modules, modules_actifs, descriptions_modules
36 from .parametres import *
37
38 time_version = mktime(date_version + (0, 0, 0) + (0, 0, 0))
39 # Dernière vérification d'une éventuelle mise à jour
40 time_verification = time_version
41
42
43 # Détection de la configuration
44 repertoire = os.getcwd() # memorise le repertoire de lancement
45 python_version = float(sys.version[:3])
46 python_version_info = tuple(sys.version_info)
47 frozen = hasattr(sys, 'frozen') # le programme tourne-t-il en version "executable" ?
48
49 # Paramètres détectés dynamiquement lors de l'exécution :
50 ecriture_possible = None
51 EMPLACEMENT = '' # le répertoire contenant wxgeometrie.pyw
52
53 # Les valeurs suivantes ne doivent pas être enregistrées dans les préférences de l'utilisateur :
54 # - soit parce qu'il n'y aurait aucun sens à les sauver (__builtins__ par exemple)
55 # - soit parce qu'elles doivent être générées dynamiquement
56
57 valeurs_a_ne_pas_sauver = (
58 'EMPLACEMENT',
59 'GUIlib',
60 'ID',
61 'NOMPROG',
62 'NOMPROG2',
63 '__builtins__',
64 'charger_preferences',
65 'codage_des_angles',
66 'codage_des_lignes',
67 'date_version',
68 'dependances',
69 'descriptions_modules',
70 'ecriture_possible',
71 'emplacementsa_mettre_a_jour',
72 'familles_de_textes',
73 'getdefaultlocale',
74 'modules',
75 'moteur_de_rendu',
76 'os',
77 'pi',
78 'plateforme',
79 'platform',
80 'frozen',
81 'python_version_min',
82 'python_version_max',
83 'python_version',
84 'python_version',
85 'repertoire',
86 'styles_a_ne_pas_copier',
87 'styles_a_signification_variable',
88 'styles_de_angles',
89 'styles_de_lignes',
90 'styles_de_points',
91 'styles_de_textes',
92 'time_version',
93 'types_de_hachures',
94 'valeurs_a_ne_pas_sauver',
95 'version',
96 )
97
98 # IMPORTANT !
99 # les dictionnaires pouvant comporter de nouvelles clés lors de la sortie d'une nouvelle version doivent être mis à jour :
100 a_mettre_a_jour = (
101 'angles',
102 'arcs',
103 'arcs_orientes',
104 'aretes',
105 'boutons',
106 'cercles',
107 'champs',
108 'codage',
109 'cotes',
110 'courbes',
111 'defaut_objets',
112 'droites',
113 'interpolations',
114 'labels',
115 'modules_actifs',
116 'points',
117 'points_deplacables',
118 'polyedres',
119 'polygones',
120 'segments',
121 'taille',
122 'textes',
123 'vecteurs',
124 'widgets',
125 )
126
127 del os, platform, sys
128
129 #print(u'Import des paramètres terminé.')