2009

Table Of Contents
In the Script Editor, the Enter (Windows) or Return (Mac OS X) key above
the Shift key does not execute a command. It starts a new line so you can
type several commands before executing them.
TIP You can import maya.cmds automatically at startup by creating a file
called userSetup.py in your Maya scripts directory. The userSetup.py file
can contain any Python commands you want to execute at startup.
For more information, see Initializing the Maya Environment in and for
Python.
4 Create a polygonal cube by typing the following:
cmds.polyCube()
A polygonal cube is created at the origin. This is equivalent to using the
polyCube command in MEL.
The command is removed from the input section of the Script Editor
after execution. The command and the result of the command is output
to the upper section of the Script Editor. The results of Python commands
are displayed in the Script Editor between a set of Python commenting
characters (#).
You can also enter commands in the Command Line.
Show the Command Line by selecting Display > UI Elements. By default the
Command Line is in MEL script entry mode. You can change the mode by
clicking on the text in the lower left hand corner. To enter Python commands,
the command line must be in Python mode.
646 | Chapter 13 Scripting in Maya