comparison pyArq-Presupuestos @ 1:2ac1551ad2ab version 0.0.0

add code
author Miguel Ángel Bárcena Rodríguez <miguelangel@obraencurso.es>
date Sun, 31 Oct 2010 20:07:33 +0100
parents
children a221c14c3c31
comparison
equal deleted inserted replaced
0:a1703c4f2990 1:2ac1551ad2ab
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 = globals.path["APPDATA"] + "/mo/"
29 print _dir
30 gettext.install(_app, _dir, unicode=1)
31
32 def _run_gui():
33 """def _run_gui
34
35 Shows main window and starts the GTK+ event processing loop.
36 """
37 _window = gui.MainWindow()
38
39 # Run pyArq-Presupuestos
40 if __name__ == "__main__":
41 # Modules
42 import gettext
43 import sys
44 from Generic import globals
45 # take path to find mo file
46 _path = sys.path[0]
47 globals.path["APPDATA"]= _path
48 _translate()
49 from Gtk import gui
50 _run_gui()