comparison pyArq-Presupuestos.py @ 26:16f91684686b default tip

Upgrade to python 3. Keep python 2/3 compatibility
author Miguel Ángel Bárcena Rodríguez <miguelangel@obraencurso.es>
date Tue, 18 Jun 2019 17:50:23 +0200
parents 65e7ae0d0e63
children
comparison
equal deleted inserted replaced
25:189f8274aecd 26:16f91684686b
18 ## 18 ##
19 ## You should have received a copy of the GNU General Public License 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/>. 20 ## along with this program. If not, see <http://www.gnu.org/licenses/>.
21 21
22 # Modules 22 # Modules
23
24 # python 2/3 compatibility
25 from __future__ import absolute_import, division, print_function, unicode_literals
26 from builtins import str as text
27
23 import sys 28 import sys
24 import getopt 29 import getopt
25 import gettext 30 import gettext
26 # pyArq-Presupuestos modules 31 # pyArq-Presupuestos modules
27 from Generic import win32Locale 32 from Generic import win32Locale
74 _run_gtk() 79 _run_gtk()
75 else: 80 else:
76 _run_gtk() 81 _run_gtk()
77 except getopt.error as err: 82 except getopt.error as err:
78 # output error 83 # output error
79 print (str(err)) 84 print (txt(err))
80 85
81 # Run pyArq-Presupuestos 86 # Run pyArq-Presupuestos
82 if __name__ == "__main__": 87 if __name__ == "__main__":
83 _take_APPDATA_path() 88 _take_APPDATA_path()
84 _translate() 89 _translate()