diff options
Diffstat (limited to 'engine/src/tools/lib')
-rw-r--r-- | engine/src/tools/lib/common.py | 10 | ||||
-rw-r--r-- | engine/src/tools/lib/song.py | 6 | ||||
-rw-r--r-- | engine/src/tools/lib/tables.py | 12 |
3 files changed, 14 insertions, 14 deletions
diff --git a/engine/src/tools/lib/common.py b/engine/src/tools/lib/common.py index 4973f4e..643e988 100644 --- a/engine/src/tools/lib/common.py +++ b/engine/src/tools/lib/common.py @@ -37,7 +37,7 @@ def set_argument(arg=None, prompt=None, multiline=False): if sys.stdin in select.select([sys.stdin], [], [], .5)[0]: message = sys.stdin.readlines() else: - print prompt, + print(prompt) if multiline: sentinel = '' message = list(iter(raw_input, sentinel)) @@ -64,10 +64,10 @@ if __name__ == "__main__": msg = set_argument(sys.argv[0]) for row in msg: - print row, - print "\n", list2string(msg) + print(row) + print("\n", list2string(msg)) msg = set_argument(prompt="Message? ") for row in msg: - print row, - print "\n", list2string(msg) + print(row) + print("\n", list2string(msg)) diff --git a/engine/src/tools/lib/song.py b/engine/src/tools/lib/song.py index fdbba99..8383ffe 100644 --- a/engine/src/tools/lib/song.py +++ b/engine/src/tools/lib/song.py @@ -44,7 +44,7 @@ def hosts(opts, config): config["music"]["hosts"] = _hosts["music"][opts.env or "dev"]["hosts"]["a"] if opts.verbose: - print "hosts: " + str(config["music"]["hosts"]) + print("hosts: " + str(config["music"]["hosts"])) # noinspection PyBroadException @@ -61,7 +61,7 @@ class Song(Music): "ist": "valet_IST", "gj": "valet_TestDB2" } - Keyspaces.update(dict((v, v) for k, v in Keyspaces.iteritems())) # full name is valid too + Keyspaces.update(dict((v, v) for k, v in Keyspaces.items())) # full name is valid too def __init__(self, opts, config, logger): if opts.env: @@ -143,7 +143,7 @@ def main(): config = json.loads(open(opts.config).read()) music = Song(opts, config, logger) - print json.dumps(config.get("music")) + print (json.dumps(config.get("music"))) print (music.keyspace) diff --git a/engine/src/tools/lib/tables.py b/engine/src/tools/lib/tables.py index 7ad4836..b0957a4 100644 --- a/engine/src/tools/lib/tables.py +++ b/engine/src/tools/lib/tables.py @@ -94,7 +94,7 @@ class Tables(object): result = self.music.read_row(self.keyspace, self.table(), key, row_id)["result"] # strip "Row n" - for _, data in sorted(result.iteritems()): + for _, data in sorted(result.items()): rows.append(data) if raw: @@ -113,9 +113,9 @@ class Tables(object): if raw: if names: - print "\n" + self.table() + print("\n" + self.table()) for row in rows: - print row + print(row) return if isinstance(rows, list): @@ -142,8 +142,8 @@ class Tables(object): if json_file is None: if names: - print "\n" + self.table() - print json.dumps(rows, sort_keys=True, indent=4) + print("\n" + self.table()) + print (json.dumps(rows, sort_keys=True, indent=4)) return fh = open(json_file, "w") @@ -305,4 +305,4 @@ class Groups(Tables): if __name__ == "__main__": - print Tables.option_choices() + print(Tables.option_choices()) |