changeset 859:b8510769d001

py3 compat
author Jeff Hammel <k0scist@gmail.com>
date Wed, 11 Apr 2018 12:28:37 -0700
parents ebfcbbc8a627
children af998083be84
files python/tmpbuffer.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/python/tmpbuffer.py	Wed Apr 11 10:55:13 2018 -0700
+++ b/python/tmpbuffer.py	Wed Apr 11 12:28:37 2018 -0700
@@ -18,12 +18,12 @@
     cmdline = editor.split() # XXX shlex would be more powerful
     cmdline.append(tmpfile)
     edit = subprocess.call(cmdline)
-    buffer = file(tmpfile).read().strip()
+    buffer = open(tmpfile).read().strip()
     os.remove(tmpfile)
     return buffer
 
 if __name__ == '__main__':
     # purely for testing/illustration purposes
     contents = tmpbuffer()
-    print contents
+    print (contents)