<?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: Digging into Python&#8217;s PYC files</title>
	<atom:link href="http://www.gooli.org/blog/digging-into-pythons-pyc-files/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.gooli.org/blog/digging-into-pythons-pyc-files/</link>
	<description>on software development and related issues</description>
	<pubDate>Thu, 04 Dec 2008 01:57:08 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: gooli</title>
		<link>http://www.gooli.org/blog/digging-into-pythons-pyc-files/#comment-3348</link>
		<dc:creator>gooli</dc:creator>
		<pubDate>Sun, 18 May 2008 17:28:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.gooli.org/blog/digging-into-pythons-pyc-files/#comment-3348</guid>
		<description>You're right, but then then my version.xml file wouldn't really contain hashes of the files, but of some modified version of the files. I'm nitpicking I guess, but this is code that somebody else will probably have to maintain some day and that's just a little too confusing for my taste.</description>
		<content:encoded><![CDATA[<p>You&#8217;re right, but then then my version.xml file wouldn&#8217;t really contain hashes of the files, but of some modified version of the files. I&#8217;m nitpicking I guess, but this is code that somebody else will probably have to maintain some day and that&#8217;s just a little too confusing for my taste.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Markus</title>
		<link>http://www.gooli.org/blog/digging-into-pythons-pyc-files/#comment-3347</link>
		<dc:creator>Markus</dc:creator>
		<pubDate>Sun, 18 May 2008 17:09:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.gooli.org/blog/digging-into-pythons-pyc-files/#comment-3347</guid>
		<description>Easier would be to skip the first 8 bytes when calculating the md5 hash. Possibly adding an offset attribute to the -tags.
If the file hasn't changed elsewhere, the time-stamp is irrelevant.

def filehash(filename, offset = 0):
  f = open(filename, 'rb')
  f.seek(offset)
  data = f.read()
  f.close()
  return hashlib.md5(data).hexdigest()</description>
		<content:encoded><![CDATA[<p>Easier would be to skip the first 8 bytes when calculating the md5 hash. Possibly adding an offset attribute to the -tags.<br />
If the file hasn&#8217;t changed elsewhere, the time-stamp is irrelevant.</p>
<p>def filehash(filename, offset = 0):<br />
  f = open(filename, &#8216;rb&#8217;)<br />
  f.seek(offset)<br />
  data = f.read()<br />
  f.close()<br />
  return hashlib.md5(data).hexdigest()</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan Price</title>
		<link>http://www.gooli.org/blog/digging-into-pythons-pyc-files/#comment-2871</link>
		<dc:creator>Dan Price</dc:creator>
		<pubDate>Mon, 21 Apr 2008 23:54:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.gooli.org/blog/digging-into-pythons-pyc-files/#comment-2871</guid>
		<description>This post was very helpful-- we've been developing a packaging system and hit just exactly this problem with pyc files.</description>
		<content:encoded><![CDATA[<p>This post was very helpful&#8211; we&#8217;ve been developing a packaging system and hit just exactly this problem with pyc files.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
