Mercurial > pyarq-presupuestos
comparison pyArq-Presupuestos.py @ 14:d9e718bdee41
pyArq-Presupuestos to pyArq-Presupuestos.py
author | Miguel Ángel Bárcena Rodríguez <miguelangel@obraencurso.es> |
---|---|
date | Sat, 01 Jan 2011 20:09:02 +0100 |
parents | pyArq-Presupuestos@2fc6b47dbe70 |
children | 2a13413dcc13 |
comparison
equal
deleted
inserted
replaced
13:ff04584f66e4 | 14:d9e718bdee41 |
---|---|
1 #!/usr/bin/python | |
2 # -*- coding: utf-8 -*- | |
3 ## File presupuestos.py | |
4 ## This file is part of pyArq-Presupuestos. | |
5 ## | |
6 ## Copyright (C) 2010 Miguel Ángel Bárcena Rodríguez | |
7 ## <miguelangel@obraencurso.es> | |
8 ## | |
9 ## pyArq-Presupuestos is free software: you can redistribute it and/or modify | |
10 ## it under the terms of the GNU General Public License as published by | |
11 ## the Free Software Foundation, either version 3 of the License, or | |
12 ## (at your option) any later version. | |
13 ## | |
14 ## pyArq-Presupuestos is distributed in the hope that it will be useful, | |
15 ## but WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 ## GNU General Public License for more details. | |
18 ## | |
19 ## You should have received a copy of the GNU General Public License | |
20 ## along with this program. If not, see <http://www.gnu.org/licenses/>. | |
21 | |
22 def _translate(): | |
23 """def translate() | |
24 | |
25 Translates the program using gettext module | |
26 """ | |
27 _app = "pyArq-Presupuestos" | |
28 _dir = globalVars.path["APPDATA"] + "/mo/" | |
29 gettext.install(_app, _dir, unicode=1) | |
30 | |
31 def _run_gui(): | |
32 """def _run_gui | |
33 | |
34 Shows main window and starts the GTK+ event processing loop. | |
35 """ | |
36 _window = gui.MainWindow() | |
37 | |
38 # Run pyArq-Presupuestos | |
39 if __name__ == "__main__": | |
40 # Modules | |
41 import gettext | |
42 import sys | |
43 from Generic import globalVars | |
44 # take path to find mo file | |
45 _path = sys.path[0] | |
46 globalVars.path["APPDATA"]= _path | |
47 _translate() | |
48 from Gtk import gui | |
49 _run_gui() |