Back to the blog
Recent Posts
-
Dec 05
Twitter user streams with python
-
Nov 30
Fix Firefox 5+ font rendering in Windows
-
Aug 31
A bit of icon work
-
Jun 24
Your mobile OS can't really multitask...
-
Apr 27
Thoughts on Android and the HTC Dream
-
Feb 26
Announcing Twitterscribe: archive your tweets
Most Popular Posts
-
Why you should be using a framework
-
Dynamic methods in PHP
-
Rewriting URLs with Apache's mod_rewrite and PHP
-
Five easy things that make you a better web developer
About the Blog

I'm a web application developer in Melbourne, Australia. If you find anything useful, leave me a comment, and if you need web design, development, or accessibility and usability consulting, contact me! Cheers.
Twitter: joshsharp
Twitter user streams with python
Monday 05 Dec, 2011 12:16 AM
I have been trying to find a basic proof-of-concept for twitter user streams. I couldn't find a complete example, so I rolled my own.
I wanted to avoid the external pyCurl dependency (which means curl needs to be installed separarely on Windows) so I switched the pyCurl callback method you might have come across with some rather naive urllib2 buffering.
It works, though, and that's the important part.
Note: This has been tested on Python 2.6.5 and up. Problems have been reported with older versions.
Comments
Not a single comment.