'Compare commands based on their str command representations.'

def __eq__(self, other):

    if isinstance(other, self.__class__):
        return (six.text_type(self).strip() == six.text_type(other).strip())
    else:
        return False
