Recursive. Custom web app development

Back to the blog

Recent Posts

Most Popular Posts

  1. Why you should be using a framework
  2. Dynamic methods in PHP
  3. Rewriting URLs with Apache's mod_rewrite and PHP
  4. Five easy things that make you a better web developer

About the Blog

Self portrait

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

a bird

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.