mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-python
synced 2026-04-25 18:35:54 +02:00
Fix multiple Python 3 compatibility issues
Changes in Python 3 that made the code choke: o basestring is merged into str o print() needs parentesis o Class inheritance syntax changed o Abstract baseclass (ABCMeta) syntax changed o map.iteritems() is replaced by map.items() o Inconsistent use of tabs and spaces are no longer tolerated Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
6eaad195a8
commit
6dd594d47b
8 changed files with 44 additions and 32 deletions
|
|
@ -1,3 +1,4 @@
|
|||
from __future__ import print_function
|
||||
import jwutils.log
|
||||
|
||||
class Object(object): # export
|
||||
|
|
@ -14,7 +15,7 @@ class Object(object): # export
|
|||
for count, thing in enumerate(args):
|
||||
msg += ' ' + str(*thing)
|
||||
if len(msg):
|
||||
print msg[1:]
|
||||
print(msg[1:])
|
||||
|
||||
def debug(self, *args):
|
||||
jwutils.log.slog(jwutils.log.DEBUG, args)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue