Python script to type something in terminal
<p>I'm trying to make a python script that opens a separate terminal window and immediately enters a command without the user having to type anything.</p>

<p>I use <code>os.system("gnome-terminal")</code> to open the second terminal but I have no clue how to make it go ahead an enter a command. I tried <code>os.system("gnome-terminal -e 'python ./example.py'")</code> but it doesn't even open a second terminal, but while I have <code>os.system("gnome-terminal")</code> it opens one fine.</p>

<p>Thanks</p>