Python: added method for getting name of command.