When you start VMD, the VMD text console uses the Tcl command interpreter to process what you type. In order to use the Python interpreter, you have to tell VMD to switch to 'Python mode'. To do this, simply type 'gopython' in the console window. If VMD prints an error message reporting that the Python interpreter is not available, your version of VMD was not compiled with Python support; contact the VMD developers for help. If all goes well, you should see Python command prompt ' ' in the console window. To switch back to the Tcl interpreter, press Ctrl-D as though you were exiting Python. Switching back and forth between Python and Tcl does not destroy any of your work; all variables and modules will still be defined until you exit VMD.
Typing 'gopython filename', where filename is the name of a file containing Python code will cause VMD to switch to Python mode, process the file, then switch back to Tcl. In this way, you can embed Python functions inside your Tcl scripts!
You can also type 'gopython -command "your code here" to run an arbitrary line of python code.