June 2010
2 posts
“Want to write shorter, cleaner code? Have an unfortunate situation where you...”
– Python Tips, Tricks, and Hacks - Siafoo This is a great python reference site, it cleared up my understanding of list comprehensions within python (and a few other things, to boot!)
Jun 26th
1 note
Fun with python & iTunes and list comprehensions
I wanted to verify that all of my songs in my iTunes library existed on my local filesystem, and vice versa, so I turned to python to help me out. I exported the entire Music library from iTunes as an “m3u” playlist called “Music.m3u”, then used python to compare and contrast. Code below: #!/usr/bin/python # -*- mode: Python; tab-width: 4; indent-tabs-mode: nil; -*- # ex:...
Jun 26th