[Tutor] How can I open and use gnome-terminal from a Python script?

Jim Byrnes jf_byrnes at comcast.net
Tue Jul 8 22:45:42 CEST 2014


I would like to automate running virtualenv with a python script by:

opening gnome-terminal
cd to proper directory
run source /bin/activate

I found some examples of using os.system() to get gnome-terminal to open 
but I can't figure out how then cd to the proper directory in the new 
terminal.

My biggest frustration right now is that I can't find any documentation 
on how to use os.system().  Looking at the docs on the Python site I 
don't see system() under the os module.  Googling hasn't helped.

Thanks,  Jim



More information about the Tutor mailing list