Module Expr Str Import alias Import alias Import alias ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str If CompareIs NameLoad NameLoad body If CompareEq AttributeLoad NameLoad attr Str body Assign NameStore Str orelse If CompareEq AttributeLoad NameLoad attr Str body Assign NameStore Str orelse Assign NameStore Str Assign NameStore BinOpMod Str NameLoad Assign AttributeStore NameLoad attr Call NameLoad NameLoad Call NameLoad Call NameLoad ListLoad NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr ListLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body TryExcept body Expr Call AttributeLoad AttributeLoad NameLoad attr attr handlers ExceptHandler type TupleLoad NameLoad NameLoad body Pass decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr TupleLoad NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str While BoolOpAnd UnaryOpNot AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Num Assign AttributeStore NameLoad attr SubscriptLoad NameLoad Index Num TryExcept body Expr Call SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr Str keyword NameLoad If AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults kwarg body Expr Str Assign SubscriptStore NameLoad Index Str AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign AttributeStore NameLoad attr NameLoad If UnaryOpNot AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str While NameLoad body TryExcept body Assign TupleStore NameStore NameStore NameStore SubscriptLoad AttributeLoad NameLoad attr Index Num handlers ExceptHandler type NameLoad body Break If CompareEq NameLoad AttributeLoad AttributeLoad NameLoad attr attr body Break Expr Call AttributeLoad AttributeLoad NameLoad attr attr Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr orelse Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign AttributeStore NameLoad attr ListLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr If NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr orelse Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str TryExcept body Expr Call AttributeLoad AttributeLoad NameLoad attr attr handlers ExceptHandler type NameLoad body Pass decorator_list decorator_list
N/A N/A 
Proxy for drivers.

Copyright (c) 2009, 2013 Peter Parente

Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 N/A sys N/A traceback N/A weakref DriverProxy N/A object N/A N/A 
    Proxy to a driver implementation.

    @ivar _module: Module containing the driver implementation
    @type _module: module
    @ivar _engine: Reference to the engine that owns the driver
    @type _engine: L{engine.Engine}
    @ivar _queue: Queue of commands outstanding for the driver
    @type _queue: list
    @ivar _busy: True when the driver is busy processing a command, False when
        not
    @type _busy: bool
    @ivar _name: Name associated with the current utterance
    @type _name: str
    @ivar _debug: Debugging output enabled or not
    @type _debug: bool
    @ivar _iterator: Driver iterator to invoke when in an external run loop
    @type _iterator: iterator
     __init__ N/A N/A self engine driverName debug N/A N/A N/A 
        Constructor.

        @param engine: Reference to the engine that owns the driver
        @type engine: L{engine.Engine}
        @param driverName: Name of the driver module to use under drivers/ or
            None to select the default for the platform
        @type driverName: str
        @param debug: Debugging output enabled or not
        @type debug: bool
         N/A N/A driverName None N/A N/A N/A N/A sys platform darwin N/A N/A driverName nsss N/A N/A N/A N/A sys platform win32 N/A N/A driverName sapi5 N/A N/A driverName espeak N/A name N/A drivers.%s driverName N/A N/A self _module N/A __import__ name N/A globals N/A locals N/A driverName N/A N/A self _driver N/A N/A N/A self _module buildDriver N/A N/A weakref proxy self N/A N/A self _engine engine N/A N/A self _queue N/A N/A N/A self _busy True N/A N/A self _name None N/A N/A self _iterator None N/A N/A self _debug debug N/A __del__ N/A N/A self N/A N/A N/A N/A N/A N/A N/A N/A self _driver destroy N/A N/A N/A N/A AttributeError TypeError N/A N/A N/A _push N/A N/A self mtd args name N/A None N/A N/A 
        Adds a command to the queue.

        @param mtd: Method to invoke to process the command
        @type mtd: method
        @param args: Arguments to apply when invoking the method
        @type args: tuple
        @param name: Name associated with the command
        @type name: str
         N/A N/A N/A N/A self _queue append N/A mtd args name N/A N/A N/A self _pump N/A _pump N/A N/A self N/A N/A N/A 
        Attempts to process the next command in the queue if one exists and the
        driver is not currently busy.
         N/A N/A N/A N/A self _busy N/A len N/A self _queue N/A N/A cmd N/A N/A N/A self _queue pop 0 N/A N/A self _name N/A cmd N/A 2 N/A N/A N/A N/A N/A cmd N/A 0 N/A cmd N/A 1 N/A N/A N/A Exception N/A e N/A N/A N/A N/A self notify error exception e N/A N/A self _debug N/A N/A N/A N/A traceback print_exc N/A notify N/A N/A self topic N/A kwargs N/A N/A 
        Sends a notification to the engine from the driver.

        @param topic: Notification topic
        @type topic: str
        @param kwargs: Arbitrary keyword arguments
        @type kwargs: dict
         N/A N/A kwargs N/A name N/A self _name N/A N/A N/A N/A self _engine _notify topic kwargs N/A setBusy N/A N/A self busy N/A N/A N/A 
        Called by the driver to indicate it is busy.

        @param busy: True when busy, false when idle
        @type busy: bool
         N/A N/A self _busy busy N/A N/A N/A self _busy N/A N/A N/A N/A self _pump N/A isBusy N/A N/A self N/A N/A N/A 
        @return: True if the driver is busy, false if not
        @rtype: bool
         N/A N/A self _busy N/A say N/A N/A self text name N/A N/A N/A 
        Called by the engine to push a say command onto the queue.

        @param text: Text to speak
        @type text: unicode
        @param name: Name to associate with the utterance
        @type name: str
         N/A N/A N/A self _push N/A N/A self _driver say N/A text name N/A stop N/A N/A self N/A N/A N/A 
        Called by the engine to stop the current utterance and clear the queue
        of commands.
         N/A True N/A N/A N/A N/A N/A mtd args name N/A N/A self _queue N/A 0 N/A N/A N/A IndexError N/A N/A N/A N/A mtd N/A N/A self _engine endLoop N/A N/A N/A N/A N/A N/A self _queue pop 0 N/A N/A N/A N/A self _driver stop N/A getProperty N/A N/A self name N/A N/A N/A 
        Called by the engine to get a driver property value.

        @param name: Name of the property
        @type name: str
        @return: Property value
        @rtype: object
         N/A N/A N/A N/A self _driver getProperty name N/A setProperty N/A N/A self name value N/A N/A N/A 
        Called by the engine to set a driver property value.

        @param name: Name of the property
        @type name: str
        @param value: Property value
        @type value: object
         N/A N/A N/A self _push N/A N/A self _driver setProperty N/A name value N/A runAndWait N/A N/A self N/A N/A N/A 
        Called by the engine to start an event loop, process all commands in
        the queue at the start of the loop, and then exit the loop.
         N/A N/A N/A self _push N/A N/A self _engine endLoop N/A tuple N/A N/A N/A N/A self _driver startLoop N/A startLoop N/A N/A self useDriverLoop N/A N/A N/A 
        Called by the engine to start an event loop.
         N/A useDriverLoop N/A N/A N/A N/A N/A self _driver startLoop N/A N/A N/A self _iterator N/A N/A N/A self _driver iterate N/A endLoop N/A N/A self useDriverLoop N/A N/A N/A 
        Called by the engine to stop an event loop.
         N/A N/A self _queue N/A N/A N/A N/A N/A self _driver stop N/A useDriverLoop N/A N/A N/A N/A N/A self _driver endLoop N/A N/A N/A self _iterator None N/A N/A N/A self setBusy True N/A iterate N/A N/A self N/A N/A N/A 
        Called by the engine to iterate driver commands and notifications from
        within an external event loop.
         N/A N/A N/A N/A N/A N/A self _iterator next N/A N/A N/A StopIteration N/A N/A N/A N/A