diff 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
line wrap: on
line diff
--- a/pyArq-Presupuestos.py	Mon May 20 13:18:33 2019 +0200
+++ b/pyArq-Presupuestos.py	Tue Jun 18 17:50:23 2019 +0200
@@ -20,6 +20,11 @@
 ## along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Modules
+
+# python 2/3 compatibility
+from __future__ import absolute_import, division, print_function, unicode_literals
+from builtins import str as text
+
 import sys
 import getopt
 import gettext
@@ -76,7 +81,7 @@
             _run_gtk()
     except getopt.error as err:  
         # output error
-        print (str(err))
+        print (txt(err))
 
 # Run pyArq-Presupuestos
 if __name__ == "__main__":