The following command opens a new shell and opens nano in it, when I type it into bash:
gnome-terminal -e "bash -c 'nano test; bash'"
So I tried the same in my python code with subprocess:
import subprocess
command = "gnome-terminal"
args = " -e \"bash -c 'nano test; bash'\""
subprocess.call([command, args])
I have tried already many combinations. Basically I just want to open a shell with a specific file in nano.
First I thought this would be one the easiest steps, but it turned out to be very difficult. Don't know if the problem exists due to the masking or if it's a common problem with passing variables like I am used to in shells. So it might be rather a question for AskUbuntu or the Unix section ... not sure ...