The joined argument string is only useful for logging; some terminal
emulators seem to accept it (which probably means they pass their one
argument to a shell), others fail (gnome-terminal, alacritty, …).
By splitting the arguments, this should work on all terminal emulators.
Tested against xterm and alacritty, the former still works, the latter
now works.
Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
When running a "No GUI" flowgraph from GRC, it gives the following
deprecation warning:
Option “-e” is deprecated and might be removed in a later version of gnome-terminal.
Use “-- ” to terminate the options and put the command line to execute after it.
This follows the suggested fix to update the deprecation
Signed-off-by: Josh Morman <jmorman@perspectalabs.com>
All of the removed `from __future__ import` were needed in older
versions of Python (mostly 2.5.x and below) but later became mandatory
in most versions of Python 3 hence are not necessary anymore.
More specifically, according to __future__.py[1]:
- unicode_literals is part of Python since versions 2.6.0 and 3.0.0;
- print_function is part of Python since versions 2.6.0 and 3.0.0;
- absolute_import is part of Python since versions 2.5.0 and 3.0.0;
- division is part of Python since versions 2.2.0 and 3.0.0;
Get rid of those unnecessary imports to slightly clean up the codebase.
[1] https://github.com/python/cpython/blob/master/Lib/__future__.py
If the executed script sends some ( error ) messages you get a lot of error messages like
Traceback (most recent call last):
File "/usr/local/gnuradio/lib/python3.6/dist-packages/gnuradio/grc/core/Messages.py", line 117, in send_verbose_exec
send(verbose)
File "/usr/local/gnuradio/lib/python3.6/dist-packages/gnuradio/grc/core/Messages.py", line 52, in send
messenger(_indent + message)
TypeError: must be str, not bytes
But you don't find out the reason of this error. The return type of os.read seems to have changed between python 2.7 and python 3.
The decode function fixes this issue and you get valuable messages.