I'm still kinda uncertain about python. But if you can, How would you go about making a instant messaging webapp? This isn't for any homework or paid jobs, just curious for my website.
When a user sends a message, Python puts the message in the database and signals a change.
If a change is signaled, check to see if the other user is online. If she is, send her the message from the database.
If you just logged in, check for new messages.
Pull new messages on some interval. If there is a new message, display it.