# HG changeset patch # User Jeff Hammel # Date 1523474917 25200 # Node ID b8510769d001f176b9c02d61a42dbd3ae7cc1bc4 # Parent ebfcbbc8a627b973881300c061ec3caad8a867d9 py3 compat diff -r ebfcbbc8a627 -r b8510769d001 python/tmpbuffer.py --- 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)