Python research

Why Python?

Learning a new programming language is always a 'gamble'. If you invest time and energy into what can be a hugely steep learning curve, jumping off and trying something new is no easy task. I have initially learnt programming with actionscript then Java but have had recommendations from people I respect that saying Python is 'the way to go'.

So on an immediate level I am really impressed with Python, probably for a number of reasons. Firstly I am impressed by the level of help (good solid help) that is available on the web, Python programmers seem to be happier sharing. Secondly doing certain tasks seem to be more streamlined compared with Java and the plugins e.g. wx (graphics interface plugin) or Pys60 are really simple to use and set up. My time figuring out what isn't working seems to be less for Python also, I seem to figure things out quicker, I am aware that I have developed strategies from learning Java that makes troubleshooting easier, but I really seem to spend more time actually coding in Python and less time figuring out errors. Being able to code live is also a breeze and it limits the time compiling etc.

I work in Java and have invested time in it and will still probably use it in the future, but I feel that as an artist programmer the Python community seems to understand me more, and especially after the debacles of useless multimedia plugins, I am going to try Python for a while.

The other reason I am loving Python is because everything I have done so far, well, works! Getting access to the twitter api from Python was simple and using the pys60 (python for mobile phones) I managed to control phones I could only dream of doing in java. Yep I am talking myself into pursuing Python further.

Python and Twitter; blowing up balloons with a firehose

I have been wanting to do some work with the twitter api for some of time. I have also been wanting to start to use Python instead of Java and so the combination of the two in this project is seems to make sense to me. The idea for this project is to read data from Twitter and then use it to literally 'blow up balloons'. I turned on twitter tap of data the other day and saw the flow of peoples messages spewing out. It is hysterical to see everyones messages rushing out of Twitter and down the console on my screen, it immediately seemed to me to be another level in the transformation of the web. To read more about this project click here

To view the code for the balloons project then click here

Installing libraries

I always forget... After doing the setup for the library which is a command line thing. You just need to put the file (e.g. beautifulsoup.py)in your Python installation's "site-packages" directory. On Windows this is usually C:\Python25\Lib\site-packages, while on Unix/Linux/OSX it would be under library/python/site-packages.
MySQLdb module for reading mySQL databases
httplib2 module for importing URL's red the html
pickle can be used to save or 'pickle' data in files for later use (It is included in standard installs)
Stack overflow advice about different drawing and GUI modules
Showmedo video of adding ppython to dos

Python and multimedia

I quite admire VLC, I use it and it has proved to work with diverse codecs. It is possible to run the VLC api from Python and I am going to make this my first stab at video Python.
http://www.tribler.org/VlcMacHowto and http://wiki.videolan.org/Python_bindings
Here is a tutorial for webcam use on a PC