<?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>Binarynomad &#187; python</title>
	<atom:link href="http://binarynomad.com/blog/tag/python/feed" rel="self" type="application/rss+xml" />
	<link>http://binarynomad.com/blog</link>
	<description>Practicing contextual relativity for over 30 years...</description>
	<lastBuildDate>Mon, 22 Nov 2010 10:46:46 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Really? Is it that hard&#8230;.</title>
		<link>http://binarynomad.com/blog/2009/04/11/really-is-it-that-hard</link>
		<comments>http://binarynomad.com/blog/2009/04/11/really-is-it-that-hard#comments</comments>
		<pubDate>Sat, 11 Apr 2009 23:47:04 +0000</pubDate>
		<dc:creator>Brian</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[Tech]]></category>

		<guid isPermaLink="false">http://binarynomad.com/blog/?p=432</guid>
		<description><![CDATA[I recently purchased the book (Beginning Python Visualization) because of my interest in Data Visualization and the want to learn Python. It is a great book, and I&#8217;m having a lot of fun going through it, but one of the first walls that hit me while walking through the excersices was the need to import [...]]]></description>
			<content:encoded><![CDATA[<p>I recently purchased the book (<a href="http://www.amazon.com/Beginning-Python-Visualization-Crafting-Transformation/dp/1430218436/ref=pd_bbs_sr_1?ie=UTF8&amp;s=books">Beginning Python Visualization</a>) because of my interest in Data Visualization and the want to learn Python.  It is a great book, and I&#8217;m having a lot of fun going through it, but one of the first walls that hit me while walking through the excersices was the need to import modules to extend my programs.</p>

<p>Now importing a module (or code) is a pretty standard/common practice, it allows you to reuse existing programming snippits without having to write everything from scratch.  A good example is the <a href="http://pyserial.wiki.sourceforge.net/pySerial">pySerial</a> module.  This provides functions to read data from a COM port.  So all I have to do is <code>import pySerial</code> and I&#8217;m good to go. Except if your OS (like Mac Leopard) didn&#8217;t include it in the system modules, then you have to go out and manually install it yourself.  I really wanted a simple installer like <a href="http://www.cpan.org/">CPAN</a> for PERL, and barring that, I was really hoping for a simple (single) file to download and drop into a directory, I tried searches like:</p>

<ul>
<li>python modules install</li>
<li>python cpan</li>
<li>python mac modules</li>
</ul>

<p>Over all the problems were:</p>

<ul>
<li>There were custom installers for the module, or you had to compile/install by hand</li>
<li>You could install via Darwin Ports, but that had dependancies for Python 2.4 (I&#8217;m running 2.5) and I didn&#8217;t want to install a complete second (older) version of Python on my system.</li>
<li>There was no clear documentation on how to add a library of modules for your personal development.</li>
</ul>

<p>Python&#8217;s own site quotes another wiki that says things like:</p>

<blockquote>
  <p>Python doesn&#8217;t have a CPAN.</p>
  
  <p>Python comes with &#8220;Batteries Included&#8221;. The standard modules shipped with Python has a lot of good stuff, and for many common tasks you just don&#8217;t need the extra step of CPAN. Python&#8217;s standard library of modules is nothing to sneeze at!</p>
  
  <p>I think Python shouldn&#8217;t have a CPAN. Basically, I think CPAN is too centralized a mechanism for finding modules, and the work to create a CPAN for Python could be better spent elsewhere.</p>
</blockquote>

<p>&#8230;this isn&#8217;t very helpful if you aren&#8217;t a heavy coder and just need some unique functionality for your project, and you know that someone else has already built it.</p>

<p>Thankfully I came across <em>easy_install</em>, which seems like CPAN-lite for python.  I was easily able to run <code>easy_install pyserial</code> and the correct module was found/downloaded/installed onto my system.  No fuss, no mess.</p>

<p>I really think Apple and Python should make this more prominent on their sites.</p>
]]></content:encoded>
			<wfw:commentRss>http://binarynomad.com/blog/2009/04/11/really-is-it-that-hard/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

