summaryrefslogtreecommitdiff
path: root/grc/gui/external_editor.py
diff options
context:
space:
mode:
Diffstat (limited to 'grc/gui/external_editor.py')
-rw-r--r--grc/gui/external_editor.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/grc/gui/external_editor.py b/grc/gui/external_editor.py
index 76f21412b0..11d6fd7ebb 100644
--- a/grc/gui/external_editor.py
+++ b/grc/gui/external_editor.py
@@ -17,6 +17,8 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
"""
+from __future__ import absolute_import, print_function
+
import os
import sys
import time
@@ -71,7 +73,7 @@ class ExternalEditor(threading.Thread):
time.sleep(1)
except Exception as e:
- print >> sys.stderr, "file monitor crashed:", str(e)
+ print("file monitor crashed:", str(e), file=sys.stderr)
else:
# print "file monitor: done with", filename
pass
@@ -79,7 +81,7 @@ class ExternalEditor(threading.Thread):
if __name__ == '__main__':
def p(data):
- print data
+ print(data)
e = ExternalEditor('/usr/bin/gedit', "test", "content", p)
e.open_editor()