Skip to content

Commit

Permalink
initial release
Browse files Browse the repository at this point in the history
  • Loading branch information
tcocagne committed Jul 2, 2012
1 parent 922a113 commit d373d00
Show file tree
Hide file tree
Showing 64 changed files with 11,413 additions and 4 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
*\.pyc
_trial_temp*
*\.pdf
*\.html
dist
MANIFEST
5 changes: 5 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

include setup.py
include tx
global-exclude _trial_temp
graft doc
64 changes: 64 additions & 0 deletions README.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
Twisted DBus README
===================
Tom Cocagne <tom.cocagne@gmail.com>
v1.0, July 2012

Introduction
------------
Twisted DBus is a native Python implementation of the
http://dbus.freedesktop.org/doc/dbus-specification.html[DBus protocol]
for the http://twistedmatrix.com/trac/[Twisted] networking framework.

In addition to a link:doc/tutorial.asciidoc[Tutorial], and collection
of link:doc/tutorial_examples[Examples], the
documentation for this project also inclues
link:doc/dbus_overview.asciidoc[An Overview of the DBus Protocol]

*License*: http://www.opensource.org/licenses/mit-license.php[MIT]

Quick Example
-------------

[source,python]
----------------------------------------------------------------------
#!/usr/bin/python
from twisted.internet import reactor, defer
from tx.dbus 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,
'',
'Twisted 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()
----------------------------------------------------------------------





4 changes: 0 additions & 4 deletions README.md

This file was deleted.

Loading

0 comments on commit d373d00

Please sign in to comment.