$ easy_install -U headstock
$ svn co https://svn.defuze.org/oss/headstock/ headstock-trunk
$ cd headstock-trunk
$ python setup.py install
In order to run the basic example and see if the installation went well:
$ cd headstock-trunk/example
$ python basic.py -j username@domain -p secret
Replace the jid and password with an appropriate account.
The pubsub example runs against any pubsub service but is notable specialized against a superfeedr service: http://superfeedr.com/
$ cd headstock-trunk/example
$ python basic.py -j username@domain -p secret -a firehoser.superfeedr.com:5222
Make sure you replace the jid and password with a valid superfeedr account.