Phil Wilson wrote:
> I'm a somewhat novice Python hacker (though not a programming newbie).
> I'm trying to embed the backend of Gajim into a console-based
> application and I'm having some trouble sorting out the module
> I was wondering if there was a Gajim-based version of instructions
> like these
> - a few lines to get me connected to my server and sending a message.
> I'm pretty sure I can do everything else from there (I actually plan
> on using the PEP and PubSub XEPs).
> For example, I can get as far as
> import common.i18n
> import common.configpaths
> import common.gajim
> from common import connection
> if __name__ == "__main__":
> con = connection.Connection("accountname")
> # followed by auth etc.
> but I appear to be going down a rabbit hole of imports (IdleQueue is next).
> Are there any docs I've missed or otherwise help I can get?
There is indeed no doc about how to do a minimalistic client using gajim
backend. But I would be happy to help you with that. You plan to create
a client in curses or something like that?
To help you, you chould read src/gajim.py. It's the UI that you need to
copy (and remove every graphical things)
for idlequeue, there is a comment in this file:
# in a nongui implementation, just call:
# gajim.idlequeue = IdleQueue() , and
# gajim.idlequeue.process() each foo miliseconds
You also need to parse config file (see parser variable in gajim.py)
Don't hesitate to ask more info
Gajim-devel mailing list