From c5bfcc93f4ad9cbdf94a0d39e23053c0a62ccb7d Mon Sep 17 00:00:00 2001 From: Torben Rasmussen Date: Wed, 15 Jan 2014 10:28:12 -0800 Subject: [PATCH] Use string formatting supported by older pythons --- python/nrepl_fireplace.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/nrepl_fireplace.py b/python/nrepl_fireplace.py index 022077c..76e013c 100644 --- a/python/nrepl_fireplace.py +++ b/python/nrepl_fireplace.py @@ -18,7 +18,7 @@ def vim_encode(data): str_list = [] for c in data: if (000 <= ord(c) and ord(c) <= 037) or c == '"' or c == "\\": - str_list.append("\\{0:03o}".format(ord(c))) + str_list.append("\\%03o" % ord(c)) else: str_list.append(c) return '"' + ''.join(str_list) + '"'