<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="/stylesheets/rss.css" type="text/css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>Straight Ornamental: Setting up Python 2.5 on OS X</title>
    <link>http://grahamstratton.org/blog/public/articles/2007/05/13/setting-up-python-2-5-on-os-x</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>Ramblings from a rambler</description>
    <item>
      <title>Setting up Python 2.5 on OS X</title>
      <description>&lt;p&gt;Sadly, this isn&amp;#8217;t quite as simple as it might be.  First, set up /usr/local/src/ to contain the source of the packages to be installed:&lt;/p&gt;


&lt;pre&gt;mkdir /usr/local/src
sudo mkdir /usr/local/src
sudo chgrp admin  /usr/local/src
sudo chmod -R 775 /usr/local/src
cd /usr/local/src&lt;/pre&gt;

	&lt;p&gt;Custom packages are generally installed to /usr/local/, hence /usr/local/src is a sensible place to put the source.&lt;/p&gt;


	&lt;p&gt;Now install readline:&lt;/p&gt;


&lt;pre&gt;url -O ftp://ftp.cwru.edu/pub/bash/readline-5.2.tar.gz
tar -xzvf readline-5.2.tar.gz
cd readline-5.2
./configure --prefix=/usr/local
make
sudo make install
cd ..&lt;/pre&gt;

	&lt;p&gt;One of the exciting new batteries included with Python 2.5 is bindings for Sqlite.  So, we&amp;#8217;d better install that, too:&lt;/p&gt;


&lt;pre&gt;curl -O http://www.sqlite.org/sqlite-3.3.17.tar.gz
./configure --prefix=/usr/local --with-readline-dir=/usr/local
tar xzvf sqlite-3.3.17.tar.gz 
cd sqlite-3.3.17
./configure --prefix=/usr/local --with-readline-dir=/usr/local
make
sudo make install
cd ..&lt;/pre&gt;

	&lt;p&gt;And finally we can actually build Python:&lt;/p&gt;


&lt;pre&gt;wget http://www.python.org/ftp/python/2.5.1/Python-2.5.1.tar.bz2
tar xjvf Python-2.5.1.tar.bz2
cd Python-2.5.1/
./configure --prefix=/usr/local --with-readline-dir=/usr/local --with-sqlite3=/usr/local
make
sudo make install
cd ..&lt;/pre&gt;

	&lt;p&gt;Finally, enable tab completion in the interactive interpreter.  Set ~/.pythonstartup to contain&lt;/p&gt;


&lt;pre&gt;import readline, rlcompleter
readline.parse_and_bind("tab: complete")&lt;/pre&gt;

	&lt;p&gt;and set the environment variable &lt;span class="caps"&gt;PYTHONSTARTUP&lt;/span&gt; to point to this file,for example by adding&lt;/p&gt;


&lt;pre&gt;export PYTHONSTARTUP=~/.pythonstartup&lt;/pre&gt;

	&lt;p&gt;to ~/.bashrc&lt;/p&gt;


	&lt;p&gt;Phew. Now I can actually do something useful! Maybe my next post will be able to contain some more significant substance!&lt;/p&gt;


A quick trick I came across today.  I had code working in the interactive interpreter, but I wanted to copy into an editor.  So I copied the block into TextMate, and needed to strip out the &amp;gt;&amp;gt;&amp;gt;s, the &amp;#8230;s and the output.  Text -&amp;gt; Filter Through Command, setting the command to be 
&lt;pre&gt;egrep "&amp;gt;&amp;gt;&amp;gt;|..." | cut -c5-&lt;/pre&gt; and all sorted. Another instance of a nice blend of &lt;span class="caps"&gt;GUI&lt;/span&gt; and command line in &lt;span class="caps"&gt;OS X&lt;/span&gt;.</description>
      <pubDate>Sun, 13 May 2007 13:47:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:a5dfaee2-c58b-4494-aee9-0946ac31c70f</guid>
      <author>Graham Stratton</author>
      <link>http://grahamstratton.org/blog/public/articles/2007/05/13/setting-up-python-2-5-on-os-x</link>
      <category>Python</category>
      <category>Mac</category>
    </item>
    <item>
      <title>"Setting up Python 2.5 on OS X" by Engagement Rings</title>
      <description>&lt;p&gt;I really find this post up to the mark without any silly unwanted elaboration. All the information has been covered in the right manner. Thumbs up for this post!&lt;/p&gt;</description>
      <pubDate>Wed, 10 Mar 2010 06:06:09 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:cfa6594b-6486-4438-806c-1bad8d660c17</guid>
      <link>http://grahamstratton.org/blog/public/articles/2007/05/13/setting-up-python-2-5-on-os-x#comment-224</link>
    </item>
    <item>
      <title>"Setting up Python 2.5 on OS X" by India Tour Packages</title>
      <description>&lt;p&gt;That is some inspirational stuff. I recommend Fat Burning Furnace program to anyone who has a good motive to lose fat and build lean muscle to get that ripped look in the least amount of time.&lt;/p&gt;</description>
      <pubDate>Wed, 10 Mar 2010 06:06:02 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:c3cd95c6-77cc-46c0-acfb-a868816024e9</guid>
      <link>http://grahamstratton.org/blog/public/articles/2007/05/13/setting-up-python-2-5-on-os-x#comment-223</link>
    </item>
    <item>
      <title>"Setting up Python 2.5 on OS X" by jeep ac compressor</title>
      <description>&lt;p&gt;Offers auto air conditioning parts including ac compressor, ac
condenser and more. Toll free phone support and full warranty on all
ac parts.  Free Shipping and 30 day return policy.&lt;/p&gt;</description>
      <pubDate>Fri, 26 Feb 2010 13:14:53 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:534112fd-491f-4d34-a408-83976ffb40fa</guid>
      <link>http://grahamstratton.org/blog/public/articles/2007/05/13/setting-up-python-2-5-on-os-x#comment-221</link>
    </item>
    <item>
      <title>"Setting up Python 2.5 on OS X" by Anadrol-Oxymetholone</title>
      <description>&lt;p&gt;&lt;a href="http://www.euroanabolex.com" rel="nofollow"&gt;Anadrol-Oxymetholone&lt;/a&gt; Euroanabolex offers powerful oral steroid known as Anadrol-Oxymetholone, Anavar-Oxandrolone, Arimidex, Cialis, Clenbuterol, Clomid-Clomiphene Citrate. These anabolics helps you in gaining massive size in a very short period of time bodybuilding.&lt;/p&gt;</description>
      <pubDate>Wed, 10 Feb 2010 10:39:17 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:43f3db54-b375-4612-91b7-c74172473ec9</guid>
      <link>http://grahamstratton.org/blog/public/articles/2007/05/13/setting-up-python-2-5-on-os-x#comment-219</link>
    </item>
    <item>
      <title>"Setting up Python 2.5 on OS X" by New Hyundai</title>
      <description>&lt;p&gt;Arturo Fuente&lt;/p&gt;</description>
      <pubDate>Tue, 09 Feb 2010 05:09:12 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:625088ce-2021-43c0-8520-836354bc602c</guid>
      <link>http://grahamstratton.org/blog/public/articles/2007/05/13/setting-up-python-2-5-on-os-x#comment-218</link>
    </item>
    <item>
      <title>"Setting up Python 2.5 on OS X" by Arturo Fuente</title>
      <description>&lt;p&gt;Arturo Fuente&lt;/p&gt;</description>
      <pubDate>Tue, 09 Feb 2010 05:08:56 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:6a0fa28a-d05d-4fd8-b0ea-fd66b2afa20a</guid>
      <link>http://grahamstratton.org/blog/public/articles/2007/05/13/setting-up-python-2-5-on-os-x#comment-217</link>
    </item>
    <item>
      <title>"Setting up Python 2.5 on OS X" by Event Hire</title>
      <description>&lt;p&gt;&lt;a href="http://www.hireandrental.com.au/contact-us/" rel="nofollow"&gt;Event Hire&lt;/a&gt; Contact HRIA for safety barrier equipment hire, event hire, hire equipment, equipment for hire, party hire, construction hire, tool hire, event hire, floodlight hire, exhibition hire, trailer hire, excavator hire, chair hire, table hire, plant hire, truck hire, scaffolding hire, scaffold hire, wedding marquee hire, truck hire, Ute hire, hire a Ute, generator hire, access equipment hire, hire conference, and many more.&lt;/p&gt;</description>
      <pubDate>Fri, 05 Feb 2010 10:36:31 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:e210a72a-ac31-42ac-aa4a-86256b6e42e2</guid>
      <link>http://grahamstratton.org/blog/public/articles/2007/05/13/setting-up-python-2-5-on-os-x#comment-215</link>
    </item>
    <item>
      <title>"Setting up Python 2.5 on OS X" by Quiet Diesel Generator</title>
      <description>&lt;p&gt;&lt;a href="http://hardydiesel.com" rel="nofollow"&gt;Quiet Diesel Generator&lt;/a&gt;Hardy Diesel has been around since 1977 and still running strong. Currently, they are one of the largest suppliers of Diesel generators. We offer high quality name brand diesel generators at low pricing. If you find a generator for less there is something wrong. You can&amp;#8217;t go wrong with Hardy Diesel.&lt;/p&gt;</description>
      <pubDate>Tue, 02 Feb 2010 13:26:45 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:a4f18006-684e-419e-af0c-97798ee98bf5</guid>
      <link>http://grahamstratton.org/blog/public/articles/2007/05/13/setting-up-python-2-5-on-os-x#comment-214</link>
    </item>
    <item>
      <title>"Setting up Python 2.5 on OS X" by offset printer Sydney</title>
      <description>&lt;p&gt;&lt;a href="http://www.shepson.com.au/OurTeam/tabid/57/Default.aspx" rel="nofollow"&gt;offset printer Sydney&lt;/a&gt;Shepson Printing offers good old fashioned service, complemented by a modern, state of the art printing plant and professional staff. We are the best in recycled paper printing, offset printer Sydney, soy ink printing services.&lt;/p&gt;</description>
      <pubDate>Tue, 02 Feb 2010 11:20:49 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:bfafb8ff-3757-443c-a6f2-928070ce91a6</guid>
      <link>http://grahamstratton.org/blog/public/articles/2007/05/13/setting-up-python-2-5-on-os-x#comment-213</link>
    </item>
    <item>
      <title>"Setting up Python 2.5 on OS X" by Ice Machines	</title>
      <description>&lt;p&gt;&lt;a href="http://www.icemachineclearance.com/" rel="nofollow"&gt;Ice Machines&lt;/a&gt;Icemachineclearance.com offers a variety of used and refurbished ice machines that produce flaked or cubed ice. So find discount prices on ice machines, ice makers, used ice machines, and refurbished ice machines from a variety of selections.&lt;/p&gt;</description>
      <pubDate>Mon, 01 Feb 2010 10:12:52 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:9c959a76-ed67-4683-a418-29a32c217b4a</guid>
      <link>http://grahamstratton.org/blog/public/articles/2007/05/13/setting-up-python-2-5-on-os-x#comment-212</link>
    </item>
    <item>
      <title>"Setting up Python 2.5 on OS X" by Ice Machines</title>
      <description>&lt;p&gt;&lt;a href="http://www.iceandwine.com/" rel="nofollow"&gt; Ice Machines&lt;/a&gt;Iceandwine.com offers a full range of ice makers including Industrial Ice Machines, Commercial Ice Machines, Franklin &amp;#38; Scotsman Ice Machines and other luxury outdoor appliances of high quality at unbeatable prices.&lt;/p&gt;</description>
      <pubDate>Mon, 01 Feb 2010 09:09:30 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:78d44ba4-3c44-4055-b5d0-80eaa9eee96f</guid>
      <link>http://grahamstratton.org/blog/public/articles/2007/05/13/setting-up-python-2-5-on-os-x#comment-211</link>
    </item>
    <item>
      <title>"Setting up Python 2.5 on OS X" by camera stores sydney</title>
      <description>&lt;p&gt;Forwarded this to some friends, appreciate your advice&lt;/p&gt;</description>
      <pubDate>Thu, 28 Jan 2010 07:40:30 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:a9dae2f2-633a-400f-b609-fab7ae4cd80a</guid>
      <link>http://grahamstratton.org/blog/public/articles/2007/05/13/setting-up-python-2-5-on-os-x#comment-210</link>
    </item>
    <item>
      <title>"Setting up Python 2.5 on OS X" by ny dentists</title>
      <description>&lt;p&gt;Dentists in New York, NY, See Reviews and Book Online Instantly.  All appointment times are guaranteed by our dentists and doctors.&lt;/p&gt;</description>
      <pubDate>Mon, 25 Jan 2010 18:49:09 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:c44fb52a-3aa3-4ab0-91de-87bd95210220</guid>
      <link>http://grahamstratton.org/blog/public/articles/2007/05/13/setting-up-python-2-5-on-os-x#comment-208</link>
    </item>
    <item>
      <title>"Setting up Python 2.5 on OS X" by flash php chat</title>
      <description>&lt;p&gt;So far, I managed to go though only some of posts you discuss here, but I find them very interesting and informative. Just want say thank you for the information you have shared. Regards&lt;/p&gt;</description>
      <pubDate>Wed, 23 Dec 2009 12:29:09 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:e092b74d-ae0e-426c-b258-1ba3cb4972fa</guid>
      <link>http://grahamstratton.org/blog/public/articles/2007/05/13/setting-up-python-2-5-on-os-x#comment-207</link>
    </item>
    <item>
      <title>"Setting up Python 2.5 on OS X" by buy laptop</title>
      <description>&lt;p&gt;There were many more things added to XP that can be described as bloat. They&amp;#8217;ve added the famous nagging dialogs that warn you when you don&amp;#8217;t have an antivirus or your automatic updates are turned off. By default, Microsoft doesn&amp;#8217;t think you&amp;#8217;re smart enough to look at the files in Windows folders without destroying them, so they hide them and to view them you have to click &amp;#8220;Show the contents of this folder.&amp;#8221;&lt;/p&gt;</description>
      <pubDate>Thu, 17 Dec 2009 06:36:09 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:f0a77b35-5739-4be5-95ca-6e4761ffa9ab</guid>
      <link>http://grahamstratton.org/blog/public/articles/2007/05/13/setting-up-python-2-5-on-os-x#comment-205</link>
    </item>
    <item>
      <title>"Setting up Python 2.5 on OS X" by SEO</title>
      <description>&lt;p&gt;The unibody Macbooks use a single uniform aluminum enclosure to house the computer. This provides for a stronger and more consistent structural integrity for the Macbook. The old macbooks used a white or black polycarbonate shell, which is composed of several wielded components.&lt;/p&gt;</description>
      <pubDate>Wed, 16 Dec 2009 12:29:29 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:437ce50a-54ab-4171-ae29-c76671728843</guid>
      <link>http://grahamstratton.org/blog/public/articles/2007/05/13/setting-up-python-2-5-on-os-x#comment-204</link>
    </item>
    <item>
      <title>"Setting up Python 2.5 on OS X" by picktorrent</title>
      <description>&lt;p&gt;Nice tutorial. I understood everything. Thanks!&lt;/p&gt;</description>
      <pubDate>Fri, 14 Aug 2009 07:53:47 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:130f3411-f392-403f-a362-c4da3a899240</guid>
      <link>http://grahamstratton.org/blog/public/articles/2007/05/13/setting-up-python-2-5-on-os-x#comment-196</link>
    </item>
  </channel>
</rss>
