1 python-purple - Python bindings for libpurple
2 ---------------------------------------------
4 Copyright (c) 2008 INdT - Instituto Nokia de Tecnologia
9 In order to build python-purple, you need the following packages:
18 Although it's not dependent, cython should also needed if you want to
19 re-create purple.c file (generated from cython using purple.pyx).
21 Building and installing python-purple
22 -------------------------------------
24 Building cython-generated purple.c file (optional):
26 $ cython purple.pyx -I libpurple/
28 This is also done by setup.py when running:
30 $ python2.5 setup.py build
32 If you don't need to generate purple.c file, you can use setup_dist.py:
34 $ python2.5 setup_dist.py build
36 Both setups generates purple.so inside build/ directory. The difference is
37 that setup.py also generates purple.c file, if it doesn't exists.
39 To install files inside your system:
41 $ sudo python2.5 setup.py install --root=/usr
43 You can also create a debian package of it:
45 $ dpkg-buildpackage -rfakeroot
50 Python-purple provides a client example (nullclient) which connects to a
51 Gtalk account and displays libpurple's debug messages. In order to execute it,
52 issue the following command:
54 $ LD_PRELOAD=/usr/lib/libpurple.so.0 python2.5 nullclient.py
56 It will ask for a username and then password. Insert it and it will
57 automatically connect to the given account.
59 There is also another example client (nullclient-ecore), which provides some
60 callback examples from libpurple interacting with UI. In order to execute it,
61 issue the following command:
63 $ LD_PRELOAD=/usr/lib/libpurple.so.0 python2.5 nullclient-ecore.py
65 An Etk-based window will pop up showing text windows, a command entry and
66 three buttons ('Send', 'Connect', 'Add account'). In order to test it, follow
69 1. Click on 'Add account' button. A pop-up window appears, and you can enter
70 there a gmail-based account (e.g. jsmith@gmail.com). Click 'Ok' when done.
72 2. Click on 'Connect' button. A pop-up window appears asking for account's
73 password. Click 'Ok' when done.
75 Now wait for the account connection. When 'Connected' appears, your buddy
78 3. You are now connected! Select a buddy from buddy list, write a message on
79 the command entry and click 'Send'. Your message appears in the text box.
80 If your buddy replies, his/her message also gets shown in the text box.