Ejemplo n.º 1
0
    def select(self, _object=None, _attributes={}, **_arguments):
        """select: Select the specified object
        Required argument: the object to select
        Keyword argument _attributes: AppleEvent attribute dictionary
        """
        _code = 'misc'
        _subcode = 'slct'

        if _arguments: raise TypeError('No optional args expected')
        _arguments['----'] = _object

        _reply, _arguments, _attributes = self.send(_code, _subcode,
                                                    _arguments, _attributes)
        if _arguments.get('errn', 0):
            raise aetools.Error(aetools.decodeerror(_arguments))
        # XXXX Optionally decode result
        if _arguments.has_key('----'):
            return _arguments['----']
Ejemplo n.º 2
0
    def revert(self, _object, _attributes={}, **_arguments):
        """revert: Revert an object to the most recently saved version
        Required argument: object to revert
        Keyword argument _attributes: AppleEvent attribute dictionary
        """
        _code = 'misc'
        _subcode = 'rvrt'

        if _arguments: raise TypeError('No optional args expected')
        _arguments['----'] = _object

        _reply, _arguments, _attributes = self.send(_code, _subcode,
                                                    _arguments, _attributes)
        if _arguments.get('errn', 0):
            raise aetools.Error(aetools.decodeerror(_arguments))
        # XXXX Optionally decode result
        if _arguments.has_key('----'):
            return _arguments['----']
Ejemplo n.º 3
0
    def do_script(self, _object=None, _attributes={}, **_arguments):
        """do script: execute a gnuplot script
        Required argument: a gnuplot script 
        Keyword argument _attributes: AppleEvent attribute dictionary
        """
        _code = 'misc'
        _subcode = 'dosc'

        if _arguments: raise TypeError('No optional args expected')
        _arguments['----'] = _object

        _reply, _arguments, _attributes = self.send(_code, _subcode,
                                                    _arguments, _attributes)
        if 'errn' in _arguments:
            raise aetools.Error(aetools.decodeerror(_arguments))
        # XXXX Optionally decode result
        if '----' in _arguments:
            return _arguments['----']
Ejemplo n.º 4
0
    def splot(self, _object=None, _attributes={}, **_arguments):
        """splot: create a 3-D plot
        Required argument: data to be plotted
        Keyword argument _attributes: AppleEvent attribute dictionary
        """
        _code = 'GPLT'
        _subcode = 'splt'

        if _arguments: raise TypeError('No optional args expected')
        _arguments['----'] = _object

        _reply, _arguments, _attributes = self.send(_code, _subcode,
                                                    _arguments, _attributes)
        if 'errn' in _arguments:
            raise aetools.Error(aetools.decodeerror(_arguments))
        # XXXX Optionally decode result
        if '----' in _arguments:
            return _arguments['----']
Ejemplo n.º 5
0
    def _print(self, _object, _attributes={}, **_arguments):
        """print: Print the specified object(s)
        Required argument: Objects to print. Can be a list of files or an object specifier.
        Keyword argument _attributes: AppleEvent attribute dictionary
        """
        _code = 'aevt'
        _subcode = 'pdoc'

        if _arguments: raise TypeError('No optional args expected')
        _arguments['----'] = _object

        _reply, _arguments, _attributes = self.send(_code, _subcode,
                                                    _arguments, _attributes)
        if 'errn' in _arguments:
            raise aetools.Error(aetools.decodeerror(_arguments))
        # XXXX Optionally decode result
        if '----' in _arguments:
            return _arguments['----']
Ejemplo n.º 6
0
    def gnuexec(self, _object=None, _attributes={}, **_arguments):
        """exec: execute a gnuplot command
        Required argument: gnuplot command
        Keyword argument _attributes: AppleEvent attribute dictionary
        """
        _code = 'GPSE'
        _subcode = 'exec'

        if _arguments: raise TypeError('No optional args expected')
        _arguments['----'] = _object

        _reply, _arguments, _attributes = self.send(_code, _subcode,
                                                    _arguments, _attributes)
        if 'errn' in _arguments:
            raise aetools.Error(aetools.decodeerror(_arguments))
        # XXXX Optionally decode result
        if '----' in _arguments:
            return _arguments['----']
Ejemplo n.º 7
0
    def set(self, _object, _attributes={}, **_arguments):
        """set: Set an objectÕs data
        Required argument: the object to change
        Keyword argument to: the new value
        Keyword argument _attributes: AppleEvent attribute dictionary
        """
        _code = 'core'
        _subcode = 'setd'

        aetools.keysubst(_arguments, self._argmap_set)
        _arguments['----'] = _object

        _reply, _arguments, _attributes = self.send(_code, _subcode,
                                                    _arguments, _attributes)
        if _arguments.has_key('errn'):
            raise aetools.Error(aetools.decodeerror(_arguments))
        # XXXX Optionally decode result
        if _arguments.has_key('----'):
            return _arguments['----']
Ejemplo n.º 8
0
    def use_tokenizer(self, _object, _attributes={}, **_arguments):
        """use tokenizer: Tells the indexing tool which tokenizer to use.
        Required argument: Specify \xd2English\xd3, \xd2European\xd3, \xd2Japanese\xd3, \xd2Korean\xd3, or \xd2Simple\xd3.
        Keyword argument _attributes: AppleEvent attribute dictionary
        """
        _code = 'HIT '
        _subcode = 'uTok'

        if _arguments: raise TypeError('No optional args expected')
        _arguments['----'] = _object


        _reply, _arguments, _attributes = self.send(_code, _subcode,
                _arguments, _attributes)
        if _arguments.get('errn', 0):
            raise aetools.Error(aetools.decodeerror(_arguments))
        # XXXX Optionally decode result
        if _arguments.has_key('----'):
            return _arguments['----']
Ejemplo n.º 9
0
    def turn_anchor_indexing(self, _object, _attributes={}, **_arguments):
        """turn anchor indexing: Turns anchor indexing on or off.
        Required argument: \xd2on\xd3 or \xd2off\xd3, to turn anchor indexing on or off
        Keyword argument _attributes: AppleEvent attribute dictionary
        """
        _code = 'HIT '
        _subcode = 'tAnc'

        if _arguments: raise TypeError('No optional args expected')
        _arguments['----'] = _object


        _reply, _arguments, _attributes = self.send(_code, _subcode,
                _arguments, _attributes)
        if _arguments.get('errn', 0):
            raise aetools.Error(aetools.decodeerror(_arguments))
        # XXXX Optionally decode result
        if _arguments.has_key('----'):
            return _arguments['----']
Ejemplo n.º 10
0
    def get(self, _object, _attributes={}, **_arguments):
        """get: Get the data for an object
        Required argument: the object whose data is to be returned
        Keyword argument _attributes: AppleEvent attribute dictionary
        Returns: The data from the object
        """
        _code = 'core'
        _subcode = 'getd'

        if _arguments: raise TypeError('No optional args expected')
        _arguments['----'] = _object

        _reply, _arguments, _attributes = self.send(_code, _subcode,
                                                    _arguments, _attributes)
        if 'errn' in _arguments:
            raise aetools.Error(aetools.decodeerror(_arguments))
        # XXXX Optionally decode result
        if '----' in _arguments:
            return _arguments['----']
Ejemplo n.º 11
0
    def data_size(self, _object, _attributes={}, **_arguments):
        """data size: Return the size in bytes of an object
        Required argument: the object whose data size is to be returned
        Keyword argument _attributes: AppleEvent attribute dictionary
        Returns: the size of the object in bytes
        """
        _code = 'core'
        _subcode = 'dsiz'

        if _arguments: raise TypeError('No optional args expected')
        _arguments['----'] = _object

        _reply, _arguments, _attributes = self.send(_code, _subcode,
                                                    _arguments, _attributes)
        if 'errn' in _arguments:
            raise aetools.Error(aetools.decodeerror(_arguments))
        # XXXX Optionally decode result
        if '----' in _arguments:
            return _arguments['----']
Ejemplo n.º 12
0
    def save(self, _object, _attributes={}, **_arguments):
        """save: save a set of objects
        Required argument: Objects to save.
        Keyword argument _in: the file in which to save the object(s)
        Keyword argument as: the file type of the document in which to save the data
        Keyword argument _attributes: AppleEvent attribute dictionary
        """
        _code = 'core'
        _subcode = 'save'

        aetools.keysubst(_arguments, self._argmap_save)
        _arguments['----'] = _object

        _reply, _arguments, _attributes = self.send(_code, _subcode,
                                                    _arguments, _attributes)
        if _arguments.has_key('errn'):
            raise aetools.Error(aetools.decodeerror(_arguments))
        # XXXX Optionally decode result
        if _arguments.has_key('----'):
            return _arguments['----']
Ejemplo n.º 13
0
    def turn_remote_root(self, _object, _attributes={}, **_arguments):
        """turn remote root: Turn usage of remote root for content on the web on or off. If turning \xd2on\xd3, supply a string as second parameter.
        Required argument: \xd2on\xd3 or \xd2off\xd3, to turn remote root on or off
        Keyword argument with_root_url: The remote root to use, in the form of \xd2http://www.apple.com/help/\xd3.
        Keyword argument _attributes: AppleEvent attribute dictionary
        """
        _code = 'HIT '
        _subcode = 'tRem'

        aetools.keysubst(_arguments, self._argmap_turn_remote_root)
        _arguments['----'] = _object


        _reply, _arguments, _attributes = self.send(_code, _subcode,
                _arguments, _attributes)
        if _arguments.get('errn', 0):
            raise aetools.Error(aetools.decodeerror(_arguments))
        # XXXX Optionally decode result
        if _arguments.has_key('----'):
            return _arguments['----']
Ejemplo n.º 14
0
    def close(self, _object, _attributes={}, **_arguments):
        """close: Close an object
        Required argument: the objects to close
        Keyword argument saving: specifies whether or not changes should be saved before closing
        Keyword argument _in: the file in which to save the object
        Keyword argument _attributes: AppleEvent attribute dictionary
        """
        _code = 'core'
        _subcode = 'clos'

        aetools.keysubst(_arguments, self._argmap_close)
        _arguments['----'] = _object

        aetools.enumsubst(_arguments, 'savo', _Enum_savo)

        _reply, _arguments, _attributes = self.send(_code, _subcode,
                                                    _arguments, _attributes)
        if _arguments.has_key('errn'):
            raise aetools.Error(aetools.decodeerror(_arguments))
        # XXXX Optionally decode result
        if _arguments.has_key('----'):
            return _arguments['----']
Ejemplo n.º 15
0
    def make(self, _no_object=None, _attributes={}, **_arguments):
        """make: Make a new element
        Keyword argument new: the class of the new element
        Keyword argument at: the location at which to insert the element
        Keyword argument with_data: the initial data for the element
        Keyword argument with_properties: the initial values for the properties of the element
        Keyword argument _attributes: AppleEvent attribute dictionary
        Returns: Object specifier for the new element
        """
        _code = 'core'
        _subcode = 'crel'

        aetools.keysubst(_arguments, self._argmap_make)
        if _no_object != None: raise TypeError('No direct arg expected')

        _reply, _arguments, _attributes = self.send(_code, _subcode,
                                                    _arguments, _attributes)
        if 'errn' in _arguments:
            raise aetools.Error(aetools.decodeerror(_arguments))
        # XXXX Optionally decode result
        if '----' in _arguments:
            return _arguments['----']