diff --git a/demos/echo/client.py b/demos/echo/client.py index ad5ad4f8..140c14dc 100644 --- a/demos/echo/client.py +++ b/demos/echo/client.py @@ -35,7 +35,7 @@ def echo_forever(main_queue, main_event): except Exception: import traceback traceback.print_exc() - print("EXCEPT ('{}', {}) with fd {} over {}s".format(addr, port, fileno, cdelta + delta)) + print("EXCEPT ('{0}', {1}) with fd {2} over {3}s".format(addr, port, fileno, cdelta + delta)) finally: main_queue.put(_max) @@ -57,7 +57,7 @@ def main(): eid_proc[eid] = proc while True: alive = len([_proc for _proc in eid_proc.values() if _proc.is_alive()]) - print('{}/{} alive'.format(alive, limit)) + print('{0}/{1} alive'.format(alive, limit)) if alive == 0: print('All of the client processes are dead. Exiting loop...') break @@ -82,8 +82,8 @@ def main(): else: delta = "unknown" time.sleep(1) - print("Max time to establish: {}".format(cdelta)) - print("Max time echo reply: {}".format(delta)) + print("Max time to establish: {0}".format(cdelta)) + print("Max time echo reply: {0}".format(delta)) print(cdelta, delta) diff --git a/rpyc/core/vinegar.py b/rpyc/core/vinegar.py index b182f807..c79425bb 100644 --- a/rpyc/core/vinegar.py +++ b/rpyc/core/vinegar.py @@ -27,7 +27,7 @@ REMOTE_LINE_START = "\n\n========= Remote Traceback " REMOTE_LINE_END = " =========\n" -REMOTE_LINE = "{}({{}}){}".format(REMOTE_LINE_START, REMOTE_LINE_END) +REMOTE_LINE = "{0}({{}}){1}".format(REMOTE_LINE_START, REMOTE_LINE_END) try: diff --git a/rpyc/lib/__init__.py b/rpyc/lib/__init__.py index 50a30d9e..03c300cc 100644 --- a/rpyc/lib/__init__.py +++ b/rpyc/lib/__init__.py @@ -153,10 +153,10 @@ def exp_backoff(collision): def get_id_pack(obj): """introspects the given (local) object, returns id_pack as expected by BaseNetref""" if not inspect.isclass(obj): - name_pack = '{}.{}'.format(obj.__class__.__module__, obj.__class__.__name__) + name_pack = '{0}.{1}'.format(obj.__class__.__module__, obj.__class__.__name__) return (name_pack, id(type(obj)), id(obj)) else: - name_pack = '{}.{}'.format(obj.__module__, obj.__name__) + name_pack = '{0}.{1}'.format(obj.__module__, obj.__name__) return (name_pack, id(obj), 0)