Modernize code for easier Python 3 port

- Replace print statement with function call
- Replace except ..., ...: syntax with except ... as ...:
- Simplify obsolete try ... except ... code block
- Replace some unicode calls with u-prefixed strings
- Do not use `len(SEQUENCE)` to determine if a sequence is empty
- Replace dictionary creation
- Drop support for GObject static bindings
This commit is contained in:
JoeLametta
2019-01-16 21:08:43 +00:00
parent 0e17b32740
commit fef7973113
6 changed files with 17 additions and 28 deletions

View File

@@ -64,4 +64,4 @@ if len(line) > 11:
line = line[:-2] + '"'
lines.append(line)
print "\n".join(lines)
print("\n".join(lines))