pymel.core.general.commandEcho

commandEcho(*args, **kwargs)

This command controls what is echoed to the command window. In query mode, return type is based on queried flag.

Flags:

Long Name / Short Name Argument Types Properties
addFilter / af unicode ../../../_images/create.gif
  This flag allows you to append filters to the current list of filtered commands when echo all commands is enabled. Just like the filter flag, you can provide a partial command name, so all commands that start with a substring specified in the addFilter entry will be filtered out.
filter / f unicode ../../../_images/create.gif ../../../_images/query.gif
  This flag allows you to filter out unwanted commands when echo all commands is enabled. You can provide a partial command name, so all commands that start with a substring specified in filter entry will be filtered out. If filter is empty, all commands are echoed to the command window.
lineNumbers / ln bool ../../../_images/create.gif ../../../_images/query.gif
  If true then file name and line number information is provided in error and warning messages. If false then no file name and line number information is provided in error and warning messages.
state / st bool ../../../_images/create.gif ../../../_images/query.gif
  If true then all commands are echoed to the command window. If false then only relevant commands are echoed. Flag can have multiple arguments, passed either as a tuple or a list.

Derived from mel command maya.cmds.commandEcho

Example:

import pymel.core as pm

# Echo everything
pm.commandEcho( state=True )
# Go back to normal
pm.commandEcho( state=False )
# Display line number information in messages.  This is the default.
pm.commandEcho( lineNumbers=True )
# Do not display line number information in messages.
pm.commandEcho( lineNumbers=False )
# Do not display changeToolIcon, escapeCurrentTool or autoUpdateAttrEd commands when echoing everything
pm.commandEcho( filter=('changeToolIcon', 'escapeCurrentTool', 'autoUpdateAttrEd') );
# Do not display setLastFocusedCommandReporter or setLastFocusedCommandExecuter when echoing everything
pm.commandEcho( filter=('setLastFocusedCommand') );