Music Player progress

Been working on the Media Player, from the wxPython widget, MediaCtrl. I am pretty sure I’ve written at least one post a few weeks ago about how much trouble I had to go through just to get the thing working… here But luckily, since then I haven’t run into much trouble, as far as wxPython goes.

Hit the jump for an update on some of the issues I’ve been dealing with.

Some recent, minor hurdles I had to overcome, besides general anxiety over doing something I was told over and over I couldn’t do (write my own ID3 tagger/library), was having to parse the ID3v2 and v3 pages to pull out the tags and their definitions. Luckily the folks over at StackOverflow helped me out, and I learned that RegExr and Python’s ‘re’ don’t use the same syntax. Here’s the final code for that little problem.

Another one was that I was getting stuck with the creation of a library, in that there was some many different ways to design them that I ended up getting stuck at the start, just fretting over the whole idea,  and not doing anything.  As usual, after just sucking it up, and backing up all my files, or at least the most important once, I decided just to start writing and that I can always rewrite it later. A post that inspired to me act  more like this little guy, was this article I had read, which just dealt with the question of whether or not you can reuse the code you write at work. I can’t find it, but essentially, the answer was that you’ve already proven that you can solve the question once, now you can do it again, and better, which really struck a cord with me.

Another obstacle I had to , and still deal, with are the sizers in wxPython. I guess it’s just that they’re so powerful, and that the documentation is not all that friendly, but man, are they easy to screw up! I honestly don’t know when to call Layout() and Fit() and all the other methods like that, so for right now, they’re pretty scattered all over the place in my code, with the hopes that one of the places I’ve got them is the right one. It’s pretty frustrating, in that I feel like I’m sort of at the mercy of my own program, carefully poking it with a stick, hoping that nothing will come out of the darkness and bite me back.

And finally, I’ve been avoiding messing too much with the UI, because of the aforementioned sizer issue, but the general idea is to have one big panel on the left with all the songs in my library, then on the right, there’ll be the song info, along with the progress and volume sliders. You’ll see it down at the bottom of the post, but man, it’s pretty ugly, and I’m not sure that it’ll get much better, since art really isn’t my thing. Without further adieu, here’s what I got so far. Take care!


Leave a Reply

Your email address will not be published.