I am trying to write a program that opens a gnome-terminal window and executes a python file in it.
When I call the gnome-terminal
subprocess with the subprocess module like this:
import subprocess
subprocess.call(['gnome-terminal', '-x', 'python3 '+filename])
I get the following error:
Failed to execute child process "python3 /home/user/Documents/test.py” (No such file or directory)
I have tried to cd to the directory /home/user/Documents/test.py
first and then run the file, but it didn't work.