<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>the helvetica scenario &#187; python</title>
	<atom:link href="http://helveticascenario.net/blog/tag/python/feed/" rel="self" type="application/rss+xml" />
	<link>http://helveticascenario.net/blog</link>
	<description>intelligent calcium</description>
	<lastBuildDate>Fri, 26 Feb 2010 17:13:38 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>PyCon 2010 Retro</title>
		<link>http://helveticascenario.net/blog/2010/02/pycon-2010-retro/</link>
		<comments>http://helveticascenario.net/blog/2010/02/pycon-2010-retro/#comments</comments>
		<pubDate>Fri, 26 Feb 2010 17:13:38 +0000</pubDate>
		<dc:creator>nat</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[pycon]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://helveticascenario.net/blog/?p=85</guid>
		<description><![CDATA[Terry wrote his thoughts on pycon, so I figured I might as well too.
I should probably preface this with saying that I&#8217;m probably going to come off sounding like a total hater.  That&#8217;s not entirely untrue, but don&#8217;t take it personally, I just hate a lot of stuff.
I started writing out a whole long [...]]]></description>
			<content:encoded><![CDATA[<p>Terry wrote <a href="http://www.swordstyle.com/blog2/?p=1822">his thoughts</a> on pycon, so I figured I might as well too.</p>
<p>I should probably preface this with saying that I&#8217;m probably going to come off sounding like a total hater.  That&#8217;s not entirely untrue, but don&#8217;t take it personally, I just hate a lot of stuff.</p>
<p>I started writing out a whole long thing talking about every talk I saw, but I grew tired of that by about saturday morning, so here are just some of the highlights.</p>
<p>Friday started with keynotes and whatnot.  It&#8217;s nice to hear Guido talk and all, but whatever, nothing too interesting here.  First talk was Max Ischenko&#8217;s <strong>Simple WSGI Composition</strong>.  I thought the title here was a little misleading; the talk was very Pylons-focused. I&#8217;ve never used Pylons myself, and I still don&#8217;t particularly want to, but it&#8217;s good to see how the other half lives now and then.</p>
<p>Next was Daniel Greenfeld&#8217;s <strong>A Short Pinax Tutorial</strong>.  I don&#8217;t think I &#8220;get&#8221; Pinax.  I was hoping that this talk might show me how to do what I wanted with it, but now I&#8217;m feeling more like the usage I want is not part of their agenda.  I understand that, I&#8217;m all for opinionated software, I just like it better when they&#8217;re compatible with <em>my</em> opinions.  Brant&#8217;s question afterwards pretty much summed it up for me:  &#8220;Why is Pinax a thing?&#8221; I also feel that all the stuff they provide above and beyond just a collection of reasonably isolated apps just gets in the way.</p>
<p>I wish I had gone to the <strong>VisTrails</strong> talk.</p>
<p>Grig&#8217;s <strong>Creating RESTful Web Services With Restish</strong> was quite a bit better than I expected.  I&#8217;ve seen a couple REST talks, and they&#8217;re usually pretty awful, essentially boiling down to someone slowly repeating &#8220;nouns and verbs&#8221;.  I thought Grig delved a little deeper into the right things, and gave some nice comparisons to xml-rpc.  I don&#8217;t remember much more specific, I&#8217;ll probably watch the video again, though.  </p>
<p>Saturday&#8217;s keynotes were a little better.  I&#8217;m not entirely proud of it, but my brain pretty much shuts down whenever anyone starts talking about IronPython.  I just can&#8217;t bring myself to care about it at all.  PyPy, however, is some voodoo space shit from the future and it scares the hell out of me.</p>
<p>My first talk, <strong>Demystifying Non-Blocking and Asynchronous I/O</strong> was probably my favorite of the entire conference.  Peter Portante had some solid slides, and did an excellent job of explaining something I knew nothing about in a way I could easily follow. I highly recommend this one.</p>
<p>David Beazley&#8217;s <strong>Understanding the Python GIL</strong> was probably the most hyped talk of the weekend, and it did not disappoint.</p>
<p>The middle of the day saturday was a little weak, I sat it out for a little while, and worked on a little project for later.  I did go see Titus&#8217; <strong>Continuous Integration</strong> and Ned Batchelder&#8217;s <strong>Testing</strong> talks, though.  Both were very strong, and relevant to my interests.  Titus is a great speaker, and gave probably this year&#8217;s most entertaining talk for me at least.  Ned was also wearing one of my company&#8217;s nosetests shirts, which marks him as a person of quality.</p>
<p>Saturday night was the most important event of the weekend, the Testing In Python BoF meetup.  What started last year as just a quiet little meetup for a quiet mailing list somehow grew into a monster.  We were packed into the largest open space room, and people were even standing out in the hall.  I feel a little bad asking this, but who are these people?  The TiP BoF had probably the highest concentration of &#8220;big names&#8221; of any open space, I get the feeling that they attract a lot of &#8220;groupies&#8221; who figure that anything Michael Foord or Jesse Noller is going to is something they should be at too.  I suppose they&#8217;re not necessarily wrong in thinking that, but it does make getting enough beer a problem. </p>
<p>Sunday morning, I went to the <strong>Eventlet</strong> talk.  It sounded like some really cool stuff, and I hope I can think of an excuse to use it.  After that was the two <strong>Mercurial</strong> talks.  The first one by Dirkjan Ochtman wasn&#8217;t quite everything I was hoping for.  It seemed a little too aimed at people that didn&#8217;t know how DVCS worked, where I was hoping for something that actually delved into the code, showing how Mercurial specifically made it work.  Ironically the next talk, <strong>Hg vs. Git</strong> had a bit more of that, and was very good.  I still don&#8217;t know how to actually do anything in Git, but at least I&#8217;m thinking it might be possible to learn.</p>
<p>So yeah, Pycon is awesome.</p>
]]></content:encoded>
			<wfw:commentRss>http://helveticascenario.net/blog/2010/02/pycon-2010-retro/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>odd distribute/setuptools issue</title>
		<link>http://helveticascenario.net/blog/2010/02/odd-distributesetuptools-issue/</link>
		<comments>http://helveticascenario.net/blog/2010/02/odd-distributesetuptools-issue/#comments</comments>
		<pubDate>Fri, 26 Feb 2010 17:11:59 +0000</pubDate>
		<dc:creator>nat</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://helveticascenario.net/blog/?p=88</guid>
		<description><![CDATA[I&#8217;m using the system python 2.6 install on Snow Leopard, and occasionally get this when doing instally-type things:

/Library/Python/2.6/site-packages/setuptools/command/install_scripts.py:3: UserWarning: Module pkg_resources was already imported from /System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/pkg_resources.pyc, but /Library/Python/2.6/site-packages is being added to sys.path
      from pkg_resources import Distribution, PathMetadata, ensure_directory
/Library/Python/2.6/site-packages/setuptools/command/install_scripts.py:3: UserWarning: Module site was already imported from /System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site.pyc, but /Library/Python/2.6/site-packages is [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m using the system python 2.6 install on Snow Leopard, and occasionally get this when doing instally-type things:</p>
<pre>
/Library/Python/2.6/site-packages/setuptools/command/install_scripts.py:3: UserWarning: Module pkg_resources was already imported from /System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/pkg_resources.pyc, but /Library/Python/2.6/site-packages is being added to sys.path
      from pkg_resources import Distribution, PathMetadata, ensure_directory
/Library/Python/2.6/site-packages/setuptools/command/install_scripts.py:3: UserWarning: Module site was already imported from /System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site.pyc, but /Library/Python/2.6/site-packages is being added to sys.path
      from pkg_resources import Distribution, PathMetadata, ensure_directory
warning: no previously-included files matching '*.*' found under directory 'docs/_templates'
</pre>
<p>I try to be good about using virtualenv and pip and whatnot, but I probably slipped up somewhere.  Either way, I finally got tired of seeing those warnings all the time and actually read them.  Throwing caution to the wind, I deleted <code>/System/&#8203;Library/&#8203;Frameworks/&#8203;Python.framework/&#8203;Versions/&#8203;2.6/&#8203;Extras/&#8203;lib/&#8203;python/&#8203;pkg_resources.pyc</code> and everything seems to be working.  hth</p>
]]></content:encoded>
			<wfw:commentRss>http://helveticascenario.net/blog/2010/02/odd-distributesetuptools-issue/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>lxml OSX compilation madness</title>
		<link>http://helveticascenario.net/blog/2009/09/lxml-osx-compilation-madness/</link>
		<comments>http://helveticascenario.net/blog/2009/09/lxml-osx-compilation-madness/#comments</comments>
		<pubDate>Tue, 29 Sep 2009 18:22:25 +0000</pubDate>
		<dc:creator>nat</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://helveticascenario.net/blog/?p=67</guid>
		<description><![CDATA[I don&#8217;t think that there has ever been a point in time where installing lxml on OSX was not a horrible pain in the ass.  I think that at one point, it was enough just to install updated versions of libxml2 and libxslt, and lxml would compile nicely.  But I must have done [...]]]></description>
			<content:encoded><![CDATA[<p>I don&#8217;t think that there has ever been a point in time where installing <a href="http://codespeak.net/lxml/">lxml</a> on OSX was not a horrible pain in the ass.  I think that at one point, it was enough just to install updated versions of libxml2 and libxslt, and lxml would compile nicely.  But I must have done something bad, cause at some point recently, lxml just stopped compiling for me.</p>
<p>This would not do at all.  I use <a href="http://pypi.python.org/pypi/virtualenv">virtualenv</a> (and <a href="http://www.doughellmann.com/projects/virtualenvwrapper/">virtualenvwrapper</a>) pretty religiously, and am loathe to install much of anything in the system-wide site-packages.  I needed to get things to a point where a straight-up <code>easy_install lxml</code> would work.  I didn&#8217;t wanna be messing around with custom install flags or whatever every time I cut a new env.</p>
<p>This is not a neat step-by-step guide for getting lxml working in OSX.  This is just a record of some stuff that I saw, and some things that I did.  Some combination thereof was sufficient to get things working.</p>
<p>For the record, I&#8217;m using lxml 2.2.2, libxml2 2.7.5, and libxslt 1.1.26.</p>
<p>One day, I fired up python, typed <code>from lxml import etree</code> and got an error much like the following:</p>
<pre lang="">
>>> from lxml import etree
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: dlopen(/Users/nwilliams/.virtualenvs/lxml1/lib/python2.6/site-packages/lxml-2.2.2-py2.6-macosx-10.5-universal.egg/lxml/etree.so, 2): Symbol not found: _xmlFree
  Referenced from: /Users/nwilliams/.virtualenvs/lxml1/lib/python2.6/site-packages/lxml-2.2.2-py2.6-macosx-10.5-universal.egg/lxml/etree.so
  Expected in: dynamic lookup

>>>
</pre>
<p>Needless to say, I was less than pleased.</p>
<p>Looking though the source, I gathered that <code>_xmlFree</code> was a symbol exported by libxml2.  My first thought was that lxml was somehow compiling against the old system version of libxml2, or for some other reason couldn&#8217;t find the new version.</p>
<p>I noticed a few funny things about the output when installing lxml.  First, there were two lines right before all the heavy compilation work:</p>
<pre lang="">
Using build configuration of libxslt 1.1.26
Building against libxml2/libxslt in the following directory: /usr/local/lib
</pre>
<p>The second line suggested that lxml was, in fact, seeing the version of libxml2 that I wanted it to.  The first was a problem though, because normally, it looks like this:</p>
<pre lang="">
Using build configuration of libxml2 2.7.5 and libxslt 1.1.26
</pre>
<p>For some reason, lxml wasn&#8217;t finding <code>xml2-config</code>.  Doing <code>export XML2_CONFIG=/usr/local/bin/xml2-config</code> seemed to fix things.</p>
<p>The other issue was probably the important one.  While compiling lxml, I would see a bunch of warnings that looked like this:</p>
<pre lang="">
ld: warning in /usr/local/lib/libxml2.dylib, file is not of required architecture
ld: warning in /usr/local/lib/libxslt.dylib, file is not of required architecture
</pre>
<p>Also for another file or two, and all repeated a few times.</p>
<p>Checking <code>file /usr/local/lib/libxml2.dylib</code> told me that the files in question were only compiled as i386 binaries.  I eventually found <a href="http://0xced.blogspot.com/2006/07/dealing-with-outdated-open-source-libs.html">this page</a>, which showed me how to compile libxml2 and libxslt as universal binaries.  I did modify things somewhat, though, most notably adding 64-bit architectures.<br />
The configure command I used for libxml2 was:</p>
<pre lang="">
env CFLAGS="-arch i386 -arch ppc -arch x86_64 -arch ppc64" ./configure --enable-static=no --without-python --disable-dependency-tracking
</pre>
<p>And for libxslt:</p>
<pre lang="">
env CFLAGS="-arch i386 -arch ppc -arch x86_64 -arch ppc64" ./configure --disable-dependency-tracking
</pre>
<p>The <code>CFLAGS</code> bit is necessary, that&#8217;s what&#8217;s making things work.  I don&#8217;t actually know exactly what the point of <code>--enable-static=no</code> is.  I&#8217;m sure it&#8217;ll come back to bite me in the ass at some point.  <code>--without-python</code> sounds scary, but since lxml is actually an alternative to the gross &#8220;real&#8221; bindings, we don&#8217;t care about them.  I also have no idea what <code>--disable-dependency-tracking</code> does, but <code>make</code> will fail without it.</p>
<p>Once I had these universal libraries built and installed, <code>easy_install lxml</code> worked like a charm.</p>
]]></content:encoded>
			<wfw:commentRss>http://helveticascenario.net/blog/2009/09/lxml-osx-compilation-madness/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>This makes me feel good</title>
		<link>http://helveticascenario.net/blog/2008/04/this-makes-me-feel-good/</link>
		<comments>http://helveticascenario.net/blog/2008/04/this-makes-me-feel-good/#comments</comments>
		<pubDate>Wed, 16 Apr 2008 20:27:03 +0000</pubDate>
		<dc:creator>nat</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[testing]]></category>

		<guid isPermaLink="false">http://helveticascenario.net/blog/?p=6</guid>
		<description><![CDATA[http://jessenoller.com/2008/04/16/finding-python-people-is-hard/
I like when people talk about how the things I do at work are so amazing, essential, and hard to find people to do.
I started this job about a month and a half ago without out really knowing much about Python or testing.  I was familiar with BDD and using rspec in dinky little [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://jessenoller.com/2008/04/16/finding-python-people-is-hard/">http://jessenoller.com/2008/04/16/finding-python-people-is-hard/</a></p>
<p>I like when people talk about how the things I do at work are so amazing, essential, and hard to find people to do.</p>
<p>I started this job about a month and a half ago without out really knowing much about Python or testing.  I was familiar with BDD and using rspec in dinky little Rails apps, but the function test side of things, as well as all the concerns that come with automation across multiple sites were unknown to me.</p>
<p>We pretty much exclusively use <a href="http://twill.idyll.org/">twill</a> and <a href="http://code.google.com/p/python-nose/">nose</a> for our tests, and I really don&#8217;t want to think how painful things would be without them.  I might actually have to use watir or something&#8230;</p>
<p>I know if I actually go on and talk about how my company actually seems to think testing is important and part of the process then Terry will laugh at me, but I suspect that even just my experience so far has spoiled me for life.</p>
]]></content:encoded>
			<wfw:commentRss>http://helveticascenario.net/blog/2008/04/this-makes-me-feel-good/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
