I am rather new to pymol. Now, I want to use it as a module withing a python script but importing the module brings up the GUI when I execute the script. See below the toy script:

#!/usr/bin/python
from pymol import cmd
cmd.load('foo.pdb')

This script, when executed in my machine, will pop up the GUI. How can I prevent this?

-Jose