'CloseWindow: Close the window specified by either Window Identifier or Title. If no parameter is specified, close the top window.
Keyword argument ID: ID of the window to close. (Can use -1 for top window)
Keyword argument Title: Title of the window to close
Keyword argument _attributes: AppleEvent attribute dictionary
Returns: Success'

def CloseWindow(self, _no_object=None, _attributes={}, **_arguments):

    _code = 'WWW!'
    _subcode = 'CLOS'
    aetools.keysubst(_arguments, self._argmap_CloseWindow)
    if (_no_object is not None):
        raise TypeError, 'No    direct    arg    expected'
    (_reply, _arguments, _attributes) = self.send(_code, _subcode, _arguments, _attributes)
    if _arguments.get('errn', 0):
        raise aetools.Error, aetools.decodeerror(_arguments)
    if _arguments.has_key('----'):
        return _arguments['----']
