diff python/tmpbuffer.py @ 859:b8510769d001

py3 compat
author Jeff Hammel <k0scist@gmail.com>
date Wed, 11 Apr 2018 12:28:37 -0700
parents e07b99607d27
children
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)