<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Simpler iTunes Library Checker</title>
	<atom:link href="http://schinckel.net/2005/07/18/simpler-itunes-library-checker/feed/" rel="self" type="application/rss+xml" />
	<link>http://schinckel.net/2005/07/18/simpler-itunes-library-checker/</link>
	<description>Like a fortune cookie, only without the fortune, and not a cookie.</description>
	<pubDate>Fri, 09 Jan 2009 20:28:55 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6</generator>
		<item>
		<title>By: Matthew Schinckel</title>
		<link>http://schinckel.net/2005/07/18/simpler-itunes-library-checker/#comment-108</link>
		<dc:creator>Matthew Schinckel</dc:creator>
		<pubDate>Mon, 18 Jul 2005 12:45:58 +0000</pubDate>
		<guid isPermaLink="false">http://schinckel.blogsome.com/2005/07/18/simpler-itunes-library-checker/#comment-108</guid>
		<description>Do'h, obviously I did't read the comment properly, re: Set.</description>
		<content:encoded><![CDATA[<p>Do&#8217;h, obviously I did&#8217;t read the comment properly, re: Set.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matthew Schinckel</title>
		<link>http://schinckel.net/2005/07/18/simpler-itunes-library-checker/#comment-107</link>
		<dc:creator>Matthew Schinckel</dc:creator>
		<pubDate>Mon, 18 Jul 2005 12:33:31 +0000</pubDate>
		<guid isPermaLink="false">http://schinckel.blogsome.com/2005/07/18/simpler-itunes-library-checker/#comment-107</guid>
		<description>Thanks for the tips.

I take it you mean calling the &lt;code&gt;find&lt;/code&gt; line?  It was about an order of magnitude faster that the python version.  Perhaps this has something to do with the fact that my iTunes Library is stored on a remote volume, served via SMB.

I found the &lt;code&gt;urlopen()&lt;/code&gt; was easier to implement (IIRC, it was a month ago!) than converting the url to a filename.  Of course, I'll do that in the future.

Oh, and I'm on Panther, with 2.3, so no joy there (on the &lt;code&gt;set&lt;/code&gt; front, but also the plistlib, not that I'd come across this.)</description>
		<content:encoded><![CDATA[<p>Thanks for the tips.</p>
<p>I take it you mean calling the <code>find</code> line?  It was about an order of magnitude faster that the python version.  Perhaps this has something to do with the fact that my iTunes Library is stored on a remote volume, served via SMB.</p>
<p>I found the <code>urlopen()</code> was easier to implement (IIRC, it was a month ago!) than converting the url to a filename.  Of course, I&#8217;ll do that in the future.</p>
<p>Oh, and I&#8217;m on Panther, with 2.3, so no joy there (on the <code>set</code> front, but also the plistlib, not that I&#8217;d come across this.)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bob Ippolito</title>
		<link>http://schinckel.net/2005/07/18/simpler-itunes-library-checker/#comment-106</link>
		<dc:creator>Bob Ippolito</dc:creator>
		<pubDate>Mon, 18 Jul 2005 12:23:48 +0000</pubDate>
		<guid isPermaLink="false">http://schinckel.blogsome.com/2005/07/18/simpler-itunes-library-checker/#comment-106</guid>
		<description>All of the stuff I did with PyObjC is pretty much available in the standard library.  There's a (cross-platform, but only shipped with Mac OS X) plistlib module that can read this flavor of XML files and parse them into similar data structures, and you already know about urllib's method for converting file URLs.

However, plistlib in Python 2.3 was horribly broken and won't read any plist with dates in it (the iTunes library has dates).  JvR and I fixed it for 2.4, but it's still a hell of a lot slower than Apple's highly optimized and specialized not-really-an-XML-parser implemented in Objective-C (well, C really... technically that code is in CoreFoundation).

It's also easier to say "install PyObjC" than "install Python 2.4, set up your PATH appropriately, etc.".

The find-forking is a little heinous, I'd have used os.walk() and os.path.isfile() to poke at the file system.  os.path.exists() is a bit nicer than urlopen(), too.

Oh, and there's a set datatype built-in to Python 2.4 which you could've used (or the Set type from the set module in Python 2.3).  It's a LOT faster at being a set than a list is.  A dict would be fast too just not with the nice set API.</description>
		<content:encoded><![CDATA[<p>All of the stuff I did with PyObjC is pretty much available in the standard library.  There&#8217;s a (cross-platform, but only shipped with Mac OS X) plistlib module that can read this flavor of XML files and parse them into similar data structures, and you already know about urllib&#8217;s method for converting file URLs.</p>
<p>However, plistlib in Python 2.3 was horribly broken and won&#8217;t read any plist with dates in it (the iTunes library has dates).  JvR and I fixed it for 2.4, but it&#8217;s still a hell of a lot slower than Apple&#8217;s highly optimized and specialized not-really-an-XML-parser implemented in Objective-C (well, C really&#8230; technically that code is in CoreFoundation).</p>
<p>It&#8217;s also easier to say &#8220;install PyObjC&#8221; than &#8220;install Python 2.4, set up your PATH appropriately, etc.&#8221;.</p>
<p>The find-forking is a little heinous, I&#8217;d have used os.walk() and os.path.isfile() to poke at the file system.  os.path.exists() is a bit nicer than urlopen(), too.</p>
<p>Oh, and there&#8217;s a set datatype built-in to Python 2.4 which you could&#8217;ve used (or the Set type from the set module in Python 2.3).  It&#8217;s a LOT faster at being a set than a list is.  A dict would be fast too just not with the nice set API.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
