mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
fix for python3
This commit is contained in:
parent
df80796afe
commit
61f7613b8d
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python3
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
##@file
|
##@file
|
||||||
@ -63,7 +63,7 @@ def main(argv=None):
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
opts, args = getopt.getopt(argv[1:], "fhlI:t:o:", ["help"])
|
opts, args = getopt.getopt(argv[1:], "fhlI:t:o:", ["help"])
|
||||||
except getopt.error, msg:
|
except getopt.error as msg:
|
||||||
raise Usage(msg)
|
raise Usage(msg)
|
||||||
|
|
||||||
for opt in opts:
|
for opt in opts:
|
||||||
@ -105,12 +105,12 @@ def main(argv=None):
|
|||||||
filename_output = filename_template + ".out"
|
filename_output = filename_template + ".out"
|
||||||
print("no output filename given, will be:", filename_output)
|
print("no output filename given, will be:", filename_output)
|
||||||
|
|
||||||
except Usage, err:
|
except Usage as err:
|
||||||
if err.msg == "Help:":
|
if err.msg == "Help:":
|
||||||
retcode=0
|
retcode=0
|
||||||
else:
|
else:
|
||||||
print(>>sys.stderr, "Error:",err.msg)
|
print("Error:", err.msg, file=sys.stderr)
|
||||||
print(>>sys.stderr, "for help use --help")
|
print("for help use --help", file=sys.stderr)
|
||||||
retcode=2
|
retcode=2
|
||||||
|
|
||||||
print()
|
print()
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python3
|
||||||
## @file
|
## @file
|
||||||
# @brief Add __str__ and __unicode__ methods to financial objects so that @code print object @endcode leads to human readable results
|
# @brief Add __str__ and __unicode__ methods to financial objects so that @code print object @endcode leads to human readable results
|
||||||
""" @package str_methods.py -- Add __str__ and __unicode__ methods to financial objects
|
""" @package str_methods.py -- Add __str__ and __unicode__ methods to financial objects
|
||||||
@ -30,7 +30,8 @@
|
|||||||
# * It seems useful to have an object for each modification. That is because there is some Initialisation to be done.
|
# * It seems useful to have an object for each modification. That is because there is some Initialisation to be done.
|
||||||
#
|
#
|
||||||
|
|
||||||
import gnucash, function_class
|
import gnucash
|
||||||
|
from gnucash import function_class
|
||||||
|
|
||||||
# Default values for encoding of strings in GnuCashs Database
|
# Default values for encoding of strings in GnuCashs Database
|
||||||
DEFAULT_ENCODING = "UTF-8"
|
DEFAULT_ENCODING = "UTF-8"
|
||||||
|
Loading…
Reference in New Issue
Block a user