Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Native Python implementation of DBus for Twisted
Branch: master
Pull request Compare This branch is 66 commits behind cocagne:master.

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
doc
txdbus
.gitignore
MANIFEST.in
README.asciidoc
README.md
setup.py
t

README.asciidoc

Tx DBus README

Introduction

Tx DBus is a native Python implementation of the DBus protocol for the Twisted networking framework.

In addition to a Tutorial, and collection of Examples, the documentation for this project also includes An Overview of the DBus Protocol

License: MIT

Quick Example

#!/usr/bin/python

from twisted.internet import reactor, defer
from txdbus import error, client

@defer.inlineCallbacks
def show_desktop_notification():
    '''
    Displays "Hello World!" in a desktop notification window for 3 seconds
    '''
    con = yield client.connect(reactor, 'session')

    notifier = yield con.getRemoteObject('org.freedesktop.Notifications',
                                         '/org/freedesktop/Notifications')

    nid = yield notifier.callRemote('Notify',
                                    'Example Application',
                                    0,
                                    '',
                                    'Tx DBus Example',
                                    'Hello World!',
                                    [], dict(),
                                    10)

    d = defer.Deferred()
    reactor.callLater(3, lambda : d.callback(None))
    yield d

    yield notifier.callRemote('CloseNotification', nid)

    reactor.stop()

reactor.callWhenRunning(show_desktop_notification)
reactor.run()
Something went wrong with that request. Please try again.