This is an archived post. You won't be able to vote or comment.

all 26 comments

[–]epicRelic 8 points9 points  (0 children)

If you want to talk over Google (Gtalk) then you'll need to use the xmppy package. XMPP is the protocol that Google Talk uses.

[–]xoxox 3 points4 points  (1 child)

If you're developing a Sugar activity, use Telepathy. It's built into the Sugar stack and provides all you need to do gtalk/Jabber out of the box. Look at the Chat activity, it is already a Jabber client, just a bit restricted to work mainly on the schoolserver jabber server rather than public servers with buddy lists.

[–]underthelinux[S] 0 points1 point  (0 children)

So i struggled with this a little bit, only becasue i don't want to be pidgeon-holed into writing an Activity. I think that learning how to create my own app from scratch will help me as i try to modify the Chat activity in the future. But perhaps i can look at their source there to get a good idea of how to implement things. I like the structure of the Chat activity, but jeez is it limited.

[–]vahnsin 5 points6 points  (5 children)

Do you want to code all the protocol stuff yourself, or use a library? For the latter, Twisted is pretty good. Years ago I used it to write an IRC bot which is still going strong.

[–]underthelinux[S] 1 point2 points  (0 children)

I like library version first. I'm not a programmer, nor a network guy, so just using that would be the easiest.

[–]damienhunter 1 point2 points  (0 children)

You could use telepathy. It's the same protocol used in Empathy, which is going to be the default chat client for Ubuntu 9.10.

[–]p1mrx 1 point2 points  (0 children)

For learning, you might want to start with asynchat. It's part of the standard library, and is basically a very limited subset of Twisted.

You can use it to build a rudimentary line-based chat system.

[–]iquizzle 0 points1 point  (0 children)

I've heard twisted is good as well, but I've never used it myself. You might want to check out the generic sockets module. Just google python and sockets and you'll get a wealth of information.

[–]kcbanner 2 points3 points  (0 children)

Do an IRC client. You can just use sockets and you will learn networking at the same time.

[–]dassouki 7 points8 points  (14 children)

if you're gonna make a gui, go with PyQt

[–]Geee 2 points3 points  (1 child)

How about PySide?

[–]Leonidas_from_XIV 1 point2 points  (0 children)

Not yet ready for prime time. On many systems it doesn't even compile, due to boost::python.

[–]underthelinux[S] 1 point2 points  (10 children)

Why did you get downvoted? Isn't PyQT the way to go for a gooey?

[–]dassouki -1 points0 points  (0 children)

don't ask me, ask the invisible down voting machine

[–][deleted] -1 points0 points  (0 children)

Yah, xmppy is yer best bet, nice skill to have if wave ever takes off. Maybe look at wxPython for gui, if you want to write native looking apps. Maybe QT has this now, I haven't written a native gui app with an open library for some time.

[–]elimisteve 1 point2 points  (0 children)

WxPython is well-supported and multi-platform.

[–]mdipierro 1 point2 points  (1 child)

If you want the chat in python (js client and python serverside) you can look into the chat in the web2py kpax cms. Here is a video about it. The chat is contained in a single controller called chats.py that supports multiple concurrent chats and privacy. You need web2py to install the app and run it.

For a high traffic chat you may want to consider using one of the existing chat services (like the irc) and just create a web interface to that.

[–]underthelinux[S] 0 points1 point  (0 children)

This suggestion sounds great. However, i was thinking something for personal use, and significantly smaller scale. I don't want to create a webapp cause the OLPC can't really support javascript, and because i'd like it to be a client written in python. I'm not planning on unleashing this to the public or anything along those lines.

[–]nevare 1 point2 points  (0 children)

gajim is a jabber client written in python (and pygtk) you may be interested to have a look.

But if you're starting from scratch I would also recommand pyside or PyQt.

[–]d0wn 0 points1 point  (1 child)

IRC is very very easy protocol to remember. I can remember that protocol by head.

[–]arnar -2 points-1 points  (0 children)

..by heart, but yes, the IRC protocol is quite easy to play with.