def command(self, resource, obj,
                operation_timeout=None, max_envelope_size=None, locale=None):
        """
        resource can be a URL or a ResourceLocator
        """
        if isinstance(resource, str):
            resource = ResourceLocator(resource)

        headers = self._build_headers(resource, Session.CommandAction,
                                      operation_timeout, max_envelope_size, locale)
        return self.service.invoke(headers, obj)
def command ( self , resource , obj , operation_timeout = None , max_envelope_size = None , locale = None ) : if isinstance ( resource , str ) : resource = ResourceLocator ( resource ) headers = self . _build_headers ( resource , Session . CommandAction , operation_timeout , max_envelope_size , locale ) return self . service . invoke ( headers , obj )
resource can be a URL or a ResourceLocator