June 11, 2003

StreamRipper Becomes StreamJacker

Hey! Enki has moved his blog to Armyofevilrobots.com. Check it out after you are done here. This page is going nowhere though...

I am completely re-writing the streamripper software that I posted the other day, and renaming it do to a meat-namespace conflict with another package with the same name. I have renamed to StreamJacker (not to be confused with Stream Jack).

Some neato Python hints, and a .plan follow.

While StreamRipper is nicely integrated with WinAmp, it is really designed for a different purpose that StreamJacker. I started writing StreamJacker in order to learn wxPython, but the app was so useful to me while debugging it, that I have decided to refactor, continue development, and extend the program.

The Problems:


  • Twisted Matrix integrates poorly with wxPython (misses events, too deeply inherited, sparsely documented)

  • Only one stream ripped at a time

  • Unthreaded (not thread safe) ripper objects

  • DOS/Shell window while program runs

  • No saved context/history information in GUI

The Solutions:


  • Replace Twisted Matrix with a lightweight ShoutCast specific, thread safe socket listener

  • Use the thread safe listener to implement multiple ripping objects

  • Replacing Twisted Matrix event scheduler fixes the improper object closing problems, and makes the shell window a moot point

  • Cross platform registry/config file system now implemented

It is interesting to note that I had a great deal of trouble with the Twisted Matrix code. This may be because I am still somewhat of a novice python programmer, but I am a VERY experienced C++/C/PHP/Assembly/(everything EXCEPT python) developer. It seems to me that in many cases the Objects that I finally ended up using in Twisted Matrix were far too deeply nested with inheritance, and lacked API hooks that would allow one to do semingly obvious tasks (for example, the ShoutCast client had no default connection closing command, or at least no obvious one). Since shoutcast is a well documented protocol (although not by it's authors), I expect this to be fairly easy to hack together. The only concerns I have are integrating the threading with wxPython, but that is the fun part of coding isn't it!?

Posted by Enki at June 11, 2003 09:36 AM | TrackBack
Comments
Post a comment









Remember personal info?