Module ImportFrom alias Import alias Import alias TryExcept body Import alias handlers ExceptHandler type NameLoad body Import alias identifier Import alias Assign NameStore ListLoad Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad ClassDef bases AttributeLoad NameLoad attr body Expr Str Assign NameStore NameLoad Assign NameStore Str FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Str Assign NameStore BinOpDiv Call AttributeLoad AttributeLoad NameLoad attr attr Num While AttributeLoad NameLoad attr body TryFinally body TryExcept body Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad handlers ExceptHandler type AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Str orelse Expr Call AttributeLoad NameLoad attr Str finalbody Assign NameStore BinOpDiv Call AttributeLoad AttributeLoad NameLoad attr attr Num Expr Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam NameParam defaults body TryExcept body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Num handlers ExceptHandler type AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Str decorator_list decorator_list
N/A __future__ unicode_literals N/A logging N/A threading N/A N/A N/A queue N/A N/A N/A ImportError N/A N/A Queue queue N/A spotify N/A __all__ N/A EventLoop N/A logger N/A N/A logging getLogger __name__ EventLoop N/A N/A threading Thread N/A N/A Event loop for automatically processing events from libspotify.

    The event loop is a :class:`~threading.Thread` that listens to
    :attr:`~spotify.SessionEvent.NOTIFY_MAIN_THREAD` events and calls
    :meth:`~spotify.Session.process_events` when needed.

    To use it, pass it your :class:`~spotify.Session` instance and call
    :meth:`start`::

        >>> session = spotify.Session()
        >>> event_loop = spotify.EventLoop(session)
        >>> event_loop.start()

    The event loop thread is a daemon thread, so it will not stop your
    application from exiting. If you wish to stop the event loop without
    stopping your entire application, call :meth:`stop`. You may call
    :meth:`~threading.Thread.join` to block until the event loop thread has
    finished, just like for any other thread.

    .. warning::

        If you use :class:`EventLoop` to process the libspotify events, any
        event listeners you've registered will be called from the event loop
        thread. pyspotify itself is thread safe, but you'll need to ensure that
        you have proper synchronization in your own application code, as always
        when working with threads.
     N/A daemon True N/A name SpotifyEventLoop __init__ N/A N/A self session N/A N/A N/A N/A N/A N/A threading Thread __init__ self N/A N/A self _session session N/A N/A self _runnable True N/A N/A self _queue N/A N/A queue Queue N/A start N/A N/A self N/A N/A N/A Start the event loop. N/A N/A N/A N/A self _session on N/A N/A spotify SessionEvent NOTIFY_MAIN_THREAD N/A self _on_notify_main_thread N/A N/A N/A N/A threading Thread start self N/A stop N/A N/A self N/A N/A N/A Stop the event loop. N/A N/A self _runnable False N/A N/A N/A N/A self _session off N/A N/A spotify SessionEvent NOTIFY_MAIN_THREAD N/A self _on_notify_main_thread N/A run N/A N/A self N/A N/A N/A N/A N/A logger debug Spotify event loop started N/A timeout N/A N/A N/A N/A self _session process_events 1000.0 N/A N/A self _runnable N/A N/A N/A N/A N/A N/A N/A N/A logger debug Waiting %.3fs for new events timeout N/A N/A N/A N/A self _queue get timeout timeout N/A N/A N/A N/A queue Empty N/A N/A N/A N/A logger debug Timeout reached; processing events N/A N/A N/A N/A logger debug Notification received; processing events N/A N/A timeout N/A N/A N/A N/A self _session process_events 1000.0 N/A N/A N/A logger debug Spotify event loop stopped N/A _on_notify_main_thread N/A N/A self session N/A N/A N/A N/A N/A N/A N/A N/A self _queue put_nowait 1 N/A N/A N/A N/A queue Full N/A N/A N/A N/A logger warning pyspotify event loop queue full; dropped notification event N/A N/A