There are some things that can’t be done using python directly. For instance you can’t do anything with the HIK system in maya using just python. There is a way around this! You can use eval(). eval() is a special command that tells the language you are using, in this case python to read the string enclosed as a command with its arguments.
- import maya.mel
- maya.mel.eval('select Character1')
- maya.mel.eval('rename GirlCharacter')