I'm doing a project here and need to open another terminal window, which runs the command ls
.
I have tried with subprocess
but it gave error:
Traceback (most recent call last):
File "tests.py", line 8, in <module>
subprocess.Popen(cmd, stdout=subprocess.PIPE)
File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1249, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
My terminal is bash
.
How can I do this?