summaryrefslogtreecommitdiff
path: root/grc/gui/external_editor.py
diff options
context:
space:
mode:
authorMarcus Müller <marcus@hostalia.de>2018-09-21 00:00:57 +0200
committerMarcus Müller <marcus@hostalia.de>2018-09-21 00:00:57 +0200
commit267d669eb21c514c18a6ee979f5cf247d251f1ad (patch)
treec6120f5993f82daf13894e8bf905c4169493152e /grc/gui/external_editor.py
parent896d1c9da31963ecf5b0d90942c2af51ca998a69 (diff)
parent7b20b28a9e5aa4e32ee37e89e7f80d74485344e8 (diff)
Merge branch 'merge_next' (which merges next)
This has been in the making far too long. We finally merge the next branch into master, in preparation of releasing GNU Radio 3.8. There will be breakage. There will be awesomeness. There will be progress in the greatest SDR framework to ever grace the surface of the earth. Hold tight for now.
Diffstat (limited to 'grc/gui/external_editor.py')
-rw-r--r--grc/gui/external_editor.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/grc/gui/external_editor.py b/grc/gui/external_editor.py
index 010bd71d1a..155b0915c5 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
@@ -67,7 +69,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)
finally:
try:
os.remove(self.filename)
@@ -76,10 +78,7 @@ class ExternalEditor(threading.Thread):
if __name__ == '__main__':
- def p(data):
- print data
-
- e = ExternalEditor('/usr/bin/gedit', "test", "content", p)
+ e = ExternalEditor('/usr/bin/gedit', "test", "content", print)
e.open_editor()
e.start()
time.sleep(15)