summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Koslowski <koslowski@kit.edu>2015-08-12 14:10:48 +0200
committerSebastian Koslowski <koslowski@kit.edu>2015-08-12 14:10:48 +0200
commitde1defc961697ae94e268eacecb99c31bc25e42a (patch)
treeec2abd94f514d27958137b5f0aee7cb9cf65dd12
parent22e2f1aed8afdfccce3884cf6bf3140c2b8e3f53 (diff)
parent3a2cdbc9e34d277a992f3a2fcbfc6641508ca07f (diff)
Merge branch 'maint_grcwg' into master_grcwg
-rw-r--r--grc/python/Generator.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/grc/python/Generator.py b/grc/python/Generator.py
index a7d0fb6f39..f807b59ad1 100644
--- a/grc/python/Generator.py
+++ b/grc/python/Generator.py
@@ -128,13 +128,17 @@ class TopBlockGenerator(object):
# if self._generate_options == 'wx_gui' and 'darwin' in sys.platform.lower():
# python_exe = 'pythonw'
+ def args_to_string(args):
+ """Accounts for spaces in args"""
+ return ' '.join(repr(arg) if ' ' in arg else arg for arg in args)
+
# setup the command args to run
cmds = [python_exe, '-u', self.get_file_path()] # -u is unbuffered stdio
# when in no gui mode on linux, use a graphical terminal (looks nice)
xterm_executable = find_executable(XTERM_EXECUTABLE)
if self._generate_options == 'no_gui' and xterm_executable:
- cmds = [xterm_executable, '-e'] + cmds
+ cmds = [xterm_executable, '-e', args_to_string(cmds)]
p = subprocess.Popen(
args=cmds, stdout=subprocess.PIPE, stderr=subprocess.STDOUT,