<?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>Ryan Brady</title>
	<atom:link href="http://www.ryanbrady.org/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ryanbrady.org</link>
	<description>Assorted Musings, Mostly About Web and Software Development</description>
	<lastBuildDate>Tue, 17 Jan 2012 21:24:30 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Solved: Django Development Server Continues To Restart</title>
		<link>http://www.ryanbrady.org/2012/01/17/solved-django-development-server-continues-to-restart/</link>
		<comments>http://www.ryanbrady.org/2012/01/17/solved-django-development-server-continues-to-restart/#comments</comments>
		<pubDate>Tue, 17 Jan 2012 21:24:30 +0000</pubDate>
		<dc:creator>ryan</dc:creator>
				<category><![CDATA[Django]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[adb]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[Popen]]></category>
		<category><![CDATA[subprocess]]></category>

		<guid isPermaLink="false">http://www.ryanbrady.org/?p=347</guid>
		<description><![CDATA[Hey ./manage.py runserver, Y U No Work? Recently I was working on a Django-based project that integrates with Android and Embedded Linux devices. One day a coworker called me and asked about an error he had encountered. It seemed like he was not able to execute ./manage.py runserver to any port he had previously used. [...]]]></description>
				<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.ryanbrady.org%2F2012%2F01%2F17%2Fsolved-django-development-server-continues-to-restart%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.ryanbrady.org%2F2012%2F01%2F17%2Fsolved-django-development-server-continues-to-restart%2F&amp;source=rjbrady&amp;style=normal&amp;service=bit.ly&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p><strong>Hey ./manage.py runserver, Y U No Work?</strong></p>
<p>Recently I was working on a Django-based project that integrates with Android and Embedded Linux devices. One day a coworker called me and asked about an error he had encountered. It seemed like he was not able to execute ./manage.py runserver to any port he had previously used. He was careful to use Control + C to stop the server, but for some reason the port was held onto by something. Looking at the output of &#8220;ps aux&#8221; was not showing any running processes using ./manage.py.</p>
<p><strong>Who&#8217;s using that port?</strong></p>
<p>Next instead of looking at processes, I wanted to see what was holding onto that port.  I ran the following command:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">netstat</span> <span style="color: #660033;">-lpn</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #000000;">8000</span></pre></div></div>

<p>The output gave me the answer:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">tcp    <span style="color: #000000;">0</span>    <span style="color: #000000;">0</span> 127.0.0.1:<span style="color: #000000;">8000</span>        0.0.0.0:<span style="color: #000000; font-weight: bold;">*</span>      LISTEN    <span style="color: #000000;">15902</span><span style="color: #000000; font-weight: bold;">/</span>adb</pre></div></div>

<p>So ADB was the culprit. A simple kill -9 to the process ID and the issue was fixed (temporarily). The issue keeps occuring, so maybe something in my code may be keeping ADB holding onto that port. I&#8217;m using the subprocess module to interact with ADB. I tried adding a call to terminate from the result of my subprocess.Popen call, but that ended very badly and had no effect on the hanging port. I&#8217;m sure when I have time to dig deeper (read &#8220;After My Looming Deadline&#8221;), I&#8217;ll try to write some tests to explore this issue more thoroughly.</p>

<span class="slashdigglicious">
<a href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Fwww.ryanbrady.org%2F2012%2F01%2F17%2Fsolved-django-development-server-continues-to-restart%2F&amp;title=Solved%3A+Django+Development+Server+Continues+To+Restart" title="Slashdot It!"><img src="http://slashdot.org/favicon.ico" height="16" width="16" alt="[Slashdot]" /></a>
<a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.ryanbrady.org%2F2012%2F01%2F17%2Fsolved-django-development-server-continues-to-restart%2F&amp;title=Solved%3A+Django+Development+Server+Continues+To+Restart" title="Digg This Story"><img src="http://digg.com/favicon.ico" width="16" height="16" alt="[Digg]" /></a>
<a href="http://reddit.com/submit?url=http%3A%2F%2Fwww.ryanbrady.org%2F2012%2F01%2F17%2Fsolved-django-development-server-continues-to-restart%2F&amp;title=Solved%3A+Django+Development+Server+Continues+To+Restart" title="Reddit"><img src="http://reddit.com/favicon.ico" width="16" height="16" alt="[Reddit]" /></a>
<a href="http://del.icio.us/post?url=http%3A%2F%2Fwww.ryanbrady.org%2F2012%2F01%2F17%2Fsolved-django-development-server-continues-to-restart%2F&amp;title=Solved%3A+Django+Development+Server+Continues+To+Restart" title="Save to del.icio.us" onclick="window.open('http://del.icio.us/post?v=4&amp;noui&amp;jump=close&amp;url=http%3A%2F%2Fwww.ryanbrady.org%2F2012%2F01%2F17%2Fsolved-django-development-server-continues-to-restart%2F&amp;title=Solved%3A+Django+Development+Server+Continues+To+Restart', 'delicious', 'toolbar=no,width=700,height=400'); return false;"><img src="http://images.del.icio.us/static/img/delicious.small.gif" width="16" height="16" alt="[del.icio.us]" /></a>
<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.ryanbrady.org%2F2012%2F01%2F17%2Fsolved-django-development-server-continues-to-restart%2F" title="Share on Facebook"><img src="http://www.facebook.com/favicon.ico" width="16" height="16" alt="[Facebook]" /></a>
<a href="http://technorati.com/faves?add=http%3A%2F%2Fwww.ryanbrady.org%2F2012%2F01%2F17%2Fsolved-django-development-server-continues-to-restart%2F" title="Add to my Technorati Favorites"><img src="http://technorati.com/favicon.ico" width="16" height="16" alt="[Technorati]" /></a>
<a href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fwww.ryanbrady.org%2F2012%2F01%2F17%2Fsolved-django-development-server-continues-to-restart%2F&amp;title=Solved%3A+Django+Development+Server+Continues+To+Restart" title="Save to Google Bookmarks"><img src="http://www.google.com/favicon.ico" width="16" height="16" alt="[Google]" /></a>
<a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.ryanbrady.org%2F2012%2F01%2F17%2Fsolved-django-development-server-continues-to-restart%2F&amp;title=Solved%3A+Django+Development+Server+Continues+To+Restart" title="Stumble it!"><img src="http://www.stumbleupon.com/favicon.ico" width="16" height="16" alt="[StumbleUpon]" /></a>
</span>]]></content:encoded>
			<wfw:commentRss>http://www.ryanbrady.org/2012/01/17/solved-django-development-server-continues-to-restart/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>One Step Android Build &amp; Flash</title>
		<link>http://www.ryanbrady.org/2011/04/12/one-step-android-build-flash/</link>
		<comments>http://www.ryanbrady.org/2011/04/12/one-step-android-build-flash/#comments</comments>
		<pubDate>Tue, 12 Apr 2011 13:11:01 +0000</pubDate>
		<dc:creator>ryan</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[fastboot]]></category>
		<category><![CDATA[froyo]]></category>
		<category><![CDATA[tipsformyself]]></category>

		<guid isPermaLink="false">http://www.ryanbrady.org/?p=341</guid>
		<description><![CDATA[This is yet another post that&#8217;s really a reminder for me, but you&#8217;re welcome to it if it helps. I&#8217;ve been working on the Android OS for a few months now and at first I was physically touching the phone to reboot it into fastboot mode and then back to the normal boot mode. I [...]]]></description>
				<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.ryanbrady.org%2F2011%2F04%2F12%2Fone-step-android-build-flash%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.ryanbrady.org%2F2011%2F04%2F12%2Fone-step-android-build-flash%2F&amp;source=rjbrady&amp;style=normal&amp;service=bit.ly&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>This is yet another post that&#8217;s really a reminder for me, but you&#8217;re welcome to it if it helps.  I&#8217;ve been working on the Android OS for a few months now and at first I was physically touching the phone to reboot it into fastboot mode and then back to the normal boot mode.  I grew tired of this manual process and so one day it dawned on me that fastboot also had a reboot command &amp; I could make a bash alias and run all the commands to do this process at once.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">m <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #7a0874; font-weight: bold;">cd</span> out<span style="color: #000000; font-weight: bold;">/</span>target<span style="color: #000000; font-weight: bold;">/</span>product<span style="color: #000000; font-weight: bold;">/</span>passion<span style="color: #000000; font-weight: bold;">/</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> adb reboot-bootloader <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> fastboot flash system system.img <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> fastboot reboot <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #7a0874; font-weight: bold;">cd</span> ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span></pre></div></div>

<p>You&#8217;ll hear the phone vibrate when it&#8217;s booting back up normally and know it&#8217;s time to get back to work&#8230;</p>

<span class="slashdigglicious">
<a href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Fwww.ryanbrady.org%2F2011%2F04%2F12%2Fone-step-android-build-flash%2F&amp;title=One+Step+Android+Build+%26%23038%3B+Flash" title="Slashdot It!"><img src="http://slashdot.org/favicon.ico" height="16" width="16" alt="[Slashdot]" /></a>
<a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.ryanbrady.org%2F2011%2F04%2F12%2Fone-step-android-build-flash%2F&amp;title=One+Step+Android+Build+%26%23038%3B+Flash" title="Digg This Story"><img src="http://digg.com/favicon.ico" width="16" height="16" alt="[Digg]" /></a>
<a href="http://reddit.com/submit?url=http%3A%2F%2Fwww.ryanbrady.org%2F2011%2F04%2F12%2Fone-step-android-build-flash%2F&amp;title=One+Step+Android+Build+%26%23038%3B+Flash" title="Reddit"><img src="http://reddit.com/favicon.ico" width="16" height="16" alt="[Reddit]" /></a>
<a href="http://del.icio.us/post?url=http%3A%2F%2Fwww.ryanbrady.org%2F2011%2F04%2F12%2Fone-step-android-build-flash%2F&amp;title=One+Step+Android+Build+%26%23038%3B+Flash" title="Save to del.icio.us" onclick="window.open('http://del.icio.us/post?v=4&amp;noui&amp;jump=close&amp;url=http%3A%2F%2Fwww.ryanbrady.org%2F2011%2F04%2F12%2Fone-step-android-build-flash%2F&amp;title=One+Step+Android+Build+%26%23038%3B+Flash', 'delicious', 'toolbar=no,width=700,height=400'); return false;"><img src="http://images.del.icio.us/static/img/delicious.small.gif" width="16" height="16" alt="[del.icio.us]" /></a>
<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.ryanbrady.org%2F2011%2F04%2F12%2Fone-step-android-build-flash%2F" title="Share on Facebook"><img src="http://www.facebook.com/favicon.ico" width="16" height="16" alt="[Facebook]" /></a>
<a href="http://technorati.com/faves?add=http%3A%2F%2Fwww.ryanbrady.org%2F2011%2F04%2F12%2Fone-step-android-build-flash%2F" title="Add to my Technorati Favorites"><img src="http://technorati.com/favicon.ico" width="16" height="16" alt="[Technorati]" /></a>
<a href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fwww.ryanbrady.org%2F2011%2F04%2F12%2Fone-step-android-build-flash%2F&amp;title=One+Step+Android+Build+%26%23038%3B+Flash" title="Save to Google Bookmarks"><img src="http://www.google.com/favicon.ico" width="16" height="16" alt="[Google]" /></a>
<a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.ryanbrady.org%2F2011%2F04%2F12%2Fone-step-android-build-flash%2F&amp;title=One+Step+Android+Build+%26%23038%3B+Flash" title="Stumble it!"><img src="http://www.stumbleupon.com/favicon.ico" width="16" height="16" alt="[StumbleUpon]" /></a>
</span>]]></content:encoded>
			<wfw:commentRss>http://www.ryanbrady.org/2011/04/12/one-step-android-build-flash/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing Scrapy on Ubuntu</title>
		<link>http://www.ryanbrady.org/2011/03/24/installing-scrapy-on-ubuntu/</link>
		<comments>http://www.ryanbrady.org/2011/03/24/installing-scrapy-on-ubuntu/#comments</comments>
		<pubDate>Thu, 24 Mar 2011 12:45:36 +0000</pubDate>
		<dc:creator>ryan</dc:creator>
				<category><![CDATA[Django]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[scraping]]></category>
		<category><![CDATA[scrapy]]></category>

		<guid isPermaLink="false">http://www.ryanbrady.org/?p=335</guid>
		<description><![CDATA[I&#8217;ve been working on a Django-based project since October 2010 that includes some integration with Scrapy. Scrapy is a web scraping framework for Python and due to its design inspiration, Django developers will be quickly familiar with it. I have installed Scrapy no less than 10 times at this point and decided it was time [...]]]></description>
				<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.ryanbrady.org%2F2011%2F03%2F24%2Finstalling-scrapy-on-ubuntu%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.ryanbrady.org%2F2011%2F03%2F24%2Finstalling-scrapy-on-ubuntu%2F&amp;source=rjbrady&amp;style=normal&amp;service=bit.ly&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>I&#8217;ve been working on a Django-based project since October 2010 that includes some integration with <a title="Scrapy Docs" href="http://doc.scrapy.org/index.html" target="_blank">Scrapy</a>.  Scrapy is a web scraping framework for Python and due to its design inspiration, Django developers will be quickly familiar with it.  I have installed Scrapy no less than 10 times at this point and decided it was time for a script.  This post is more of a reminder to me for the next time I install Scrapy, but if it works for you as well &#8211; great!.</p>
<p>This script works for Ubuntu 9.10, 10.04 and 10.10.  If you&#8217;re on an older release, you&#8217;ll need to install some <a title="Install Dependencies" href="http://doc.scrapy.org/intro/install.html#debian-or-ubuntu-9-04-or-older" target="_blank">dependencies</a> first and then follow these <a title="Installation Instructions" href="http://doc.scrapy.org/intro/install.html#intro-install-scrapy" target="_blank">instructions</a>.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> curl
curl <span style="color: #660033;">-s</span> http:<span style="color: #000000; font-weight: bold;">//</span>archive.scrapy.org<span style="color: #000000; font-weight: bold;">/</span>ubuntu<span style="color: #000000; font-weight: bold;">/</span>archive.key <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-key</span> add -
<span style="color: #007800;">DISTRO</span>=$<span style="color: #7a0874; font-weight: bold;">&#40;</span>lsb_release -cs<span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> deb http:<span style="color: #000000; font-weight: bold;">//</span>archive.scrapy.org<span style="color: #000000; font-weight: bold;">/</span>ubuntu <span style="color: #007800;">$DISTRO</span> main <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">tee</span> <span style="color: #660033;">-a</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>apt<span style="color: #000000; font-weight: bold;">/</span>sources.list
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> update
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> scrapy-<span style="color: #000000;">0.12</span></pre></div></div>


<span class="slashdigglicious">
<a href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Fwww.ryanbrady.org%2F2011%2F03%2F24%2Finstalling-scrapy-on-ubuntu%2F&amp;title=Installing+Scrapy+on+Ubuntu" title="Slashdot It!"><img src="http://slashdot.org/favicon.ico" height="16" width="16" alt="[Slashdot]" /></a>
<a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.ryanbrady.org%2F2011%2F03%2F24%2Finstalling-scrapy-on-ubuntu%2F&amp;title=Installing+Scrapy+on+Ubuntu" title="Digg This Story"><img src="http://digg.com/favicon.ico" width="16" height="16" alt="[Digg]" /></a>
<a href="http://reddit.com/submit?url=http%3A%2F%2Fwww.ryanbrady.org%2F2011%2F03%2F24%2Finstalling-scrapy-on-ubuntu%2F&amp;title=Installing+Scrapy+on+Ubuntu" title="Reddit"><img src="http://reddit.com/favicon.ico" width="16" height="16" alt="[Reddit]" /></a>
<a href="http://del.icio.us/post?url=http%3A%2F%2Fwww.ryanbrady.org%2F2011%2F03%2F24%2Finstalling-scrapy-on-ubuntu%2F&amp;title=Installing+Scrapy+on+Ubuntu" title="Save to del.icio.us" onclick="window.open('http://del.icio.us/post?v=4&amp;noui&amp;jump=close&amp;url=http%3A%2F%2Fwww.ryanbrady.org%2F2011%2F03%2F24%2Finstalling-scrapy-on-ubuntu%2F&amp;title=Installing+Scrapy+on+Ubuntu', 'delicious', 'toolbar=no,width=700,height=400'); return false;"><img src="http://images.del.icio.us/static/img/delicious.small.gif" width="16" height="16" alt="[del.icio.us]" /></a>
<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.ryanbrady.org%2F2011%2F03%2F24%2Finstalling-scrapy-on-ubuntu%2F" title="Share on Facebook"><img src="http://www.facebook.com/favicon.ico" width="16" height="16" alt="[Facebook]" /></a>
<a href="http://technorati.com/faves?add=http%3A%2F%2Fwww.ryanbrady.org%2F2011%2F03%2F24%2Finstalling-scrapy-on-ubuntu%2F" title="Add to my Technorati Favorites"><img src="http://technorati.com/favicon.ico" width="16" height="16" alt="[Technorati]" /></a>
<a href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fwww.ryanbrady.org%2F2011%2F03%2F24%2Finstalling-scrapy-on-ubuntu%2F&amp;title=Installing+Scrapy+on+Ubuntu" title="Save to Google Bookmarks"><img src="http://www.google.com/favicon.ico" width="16" height="16" alt="[Google]" /></a>
<a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.ryanbrady.org%2F2011%2F03%2F24%2Finstalling-scrapy-on-ubuntu%2F&amp;title=Installing+Scrapy+on+Ubuntu" title="Stumble it!"><img src="http://www.stumbleupon.com/favicon.ico" width="16" height="16" alt="[StumbleUpon]" /></a>
</span>]]></content:encoded>
			<wfw:commentRss>http://www.ryanbrady.org/2011/03/24/installing-scrapy-on-ubuntu/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Simple Fix: coercing to Unicode: need string or buffer, NoneType found</title>
		<link>http://www.ryanbrady.org/2010/04/17/simple-fix-coercing-to-unicode-need-string-or-buffer-nonetype-found/</link>
		<comments>http://www.ryanbrady.org/2010/04/17/simple-fix-coercing-to-unicode-need-string-or-buffer-nonetype-found/#comments</comments>
		<pubDate>Sun, 18 Apr 2010 00:02:15 +0000</pubDate>
		<dc:creator>ryan</dc:creator>
				<category><![CDATA[Django]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://www.ryanbrady.org/?p=296</guid>
		<description><![CDATA[Have you ever edited your models.py file and shortly after when trying to see the change list for a model in the admin site you received this error? Caught an exception while rendering: coercing to Unicode: need string or buffer, NoneType found I did today and it was one of those &#8220;bonehead&#8221; moments. You know, [...]]]></description>
				<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.ryanbrady.org%2F2010%2F04%2F17%2Fsimple-fix-coercing-to-unicode-need-string-or-buffer-nonetype-found%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.ryanbrady.org%2F2010%2F04%2F17%2Fsimple-fix-coercing-to-unicode-need-string-or-buffer-nonetype-found%2F&amp;source=rjbrady&amp;style=normal&amp;service=bit.ly&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>Have you ever edited your models.py file and shortly after when trying to see the change list for a model in the admin site you received this error?</p>
<p><em>Caught an exception while rendering: coercing to Unicode: need string or buffer, NoneType found</em></p>
<p>I did today and it was one of those &#8220;bonehead&#8221; moments.  You know, the one where you&#8217;ve been coding for a bit and for some reason make a simple error that leaves you thinking &#8220;I&#8217;ve done that exact same action a hundred times, why would I get an error this time?&#8221;, when you realize you made a really simple mistake.  The answer was quick and easy.  It was not occuring on the new model form, only on the change list so I opened my models file and looked over the model in question and then realized my typo.  I had forgot to add &#8220;return&#8221; to the __unicode__ method on my model.  So if you get this error, make sure that you&#8217;re <span style="color: #ff0000;">returning</span> something and that its really unicode.</p>

<span class="slashdigglicious">
<a href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Fwww.ryanbrady.org%2F2010%2F04%2F17%2Fsimple-fix-coercing-to-unicode-need-string-or-buffer-nonetype-found%2F&amp;title=Simple+Fix%3A+coercing+to+Unicode%3A+need+string+or+buffer%2C+NoneType+found" title="Slashdot It!"><img src="http://slashdot.org/favicon.ico" height="16" width="16" alt="[Slashdot]" /></a>
<a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.ryanbrady.org%2F2010%2F04%2F17%2Fsimple-fix-coercing-to-unicode-need-string-or-buffer-nonetype-found%2F&amp;title=Simple+Fix%3A+coercing+to+Unicode%3A+need+string+or+buffer%2C+NoneType+found" title="Digg This Story"><img src="http://digg.com/favicon.ico" width="16" height="16" alt="[Digg]" /></a>
<a href="http://reddit.com/submit?url=http%3A%2F%2Fwww.ryanbrady.org%2F2010%2F04%2F17%2Fsimple-fix-coercing-to-unicode-need-string-or-buffer-nonetype-found%2F&amp;title=Simple+Fix%3A+coercing+to+Unicode%3A+need+string+or+buffer%2C+NoneType+found" title="Reddit"><img src="http://reddit.com/favicon.ico" width="16" height="16" alt="[Reddit]" /></a>
<a href="http://del.icio.us/post?url=http%3A%2F%2Fwww.ryanbrady.org%2F2010%2F04%2F17%2Fsimple-fix-coercing-to-unicode-need-string-or-buffer-nonetype-found%2F&amp;title=Simple+Fix%3A+coercing+to+Unicode%3A+need+string+or+buffer%2C+NoneType+found" title="Save to del.icio.us" onclick="window.open('http://del.icio.us/post?v=4&amp;noui&amp;jump=close&amp;url=http%3A%2F%2Fwww.ryanbrady.org%2F2010%2F04%2F17%2Fsimple-fix-coercing-to-unicode-need-string-or-buffer-nonetype-found%2F&amp;title=Simple+Fix%3A+coercing+to+Unicode%3A+need+string+or+buffer%2C+NoneType+found', 'delicious', 'toolbar=no,width=700,height=400'); return false;"><img src="http://images.del.icio.us/static/img/delicious.small.gif" width="16" height="16" alt="[del.icio.us]" /></a>
<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.ryanbrady.org%2F2010%2F04%2F17%2Fsimple-fix-coercing-to-unicode-need-string-or-buffer-nonetype-found%2F" title="Share on Facebook"><img src="http://www.facebook.com/favicon.ico" width="16" height="16" alt="[Facebook]" /></a>
<a href="http://technorati.com/faves?add=http%3A%2F%2Fwww.ryanbrady.org%2F2010%2F04%2F17%2Fsimple-fix-coercing-to-unicode-need-string-or-buffer-nonetype-found%2F" title="Add to my Technorati Favorites"><img src="http://technorati.com/favicon.ico" width="16" height="16" alt="[Technorati]" /></a>
<a href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fwww.ryanbrady.org%2F2010%2F04%2F17%2Fsimple-fix-coercing-to-unicode-need-string-or-buffer-nonetype-found%2F&amp;title=Simple+Fix%3A+coercing+to+Unicode%3A+need+string+or+buffer%2C+NoneType+found" title="Save to Google Bookmarks"><img src="http://www.google.com/favicon.ico" width="16" height="16" alt="[Google]" /></a>
<a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.ryanbrady.org%2F2010%2F04%2F17%2Fsimple-fix-coercing-to-unicode-need-string-or-buffer-nonetype-found%2F&amp;title=Simple+Fix%3A+coercing+to+Unicode%3A+need+string+or+buffer%2C+NoneType+found" title="Stumble it!"><img src="http://www.stumbleupon.com/favicon.ico" width="16" height="16" alt="[StumbleUpon]" /></a>
</span>]]></content:encoded>
			<wfw:commentRss>http://www.ryanbrady.org/2010/04/17/simple-fix-coercing-to-unicode-need-string-or-buffer-nonetype-found/feed/</wfw:commentRss>
		<slash:comments>27</slash:comments>
		</item>
		<item>
		<title>Using IronPython with MOSS 2007</title>
		<link>http://www.ryanbrady.org/2010/04/13/using-ironpython-with-moss-2007/</link>
		<comments>http://www.ryanbrady.org/2010/04/13/using-ironpython-with-moss-2007/#comments</comments>
		<pubDate>Wed, 14 Apr 2010 02:11:22 +0000</pubDate>
		<dc:creator>ryan</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Sharepoint]]></category>

		<guid isPermaLink="false">http://www.ryanbrady.org/?p=272</guid>
		<description><![CDATA[I&#8217;ve been working on a project that interacts with Microsoft Office SharePoint Server 2007 (MOSS 2007) for the last few months and one of the tools I&#8217;ve been using daily to support my work is IronPython. IronPython has made it easy for me to come up to speed quickly on the MOSS 2007 API but [...]]]></description>
				<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.ryanbrady.org%2F2010%2F04%2F13%2Fusing-ironpython-with-moss-2007%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.ryanbrady.org%2F2010%2F04%2F13%2Fusing-ironpython-with-moss-2007%2F&amp;source=rjbrady&amp;style=normal&amp;service=bit.ly&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>I&#8217;ve been working on a project that interacts with Microsoft Office SharePoint Server 2007 (MOSS 2007) for the last few months and one of the tools I&#8217;ve been using daily to support my work is <a href="http://ironpython.net/">IronPython</a>.  IronPython has made it easy for me to come up to speed quickly on the MOSS 2007 API but what has made my life even easier is the IronPython Console.</p>
<p>*Note: If you have a browser that supports Silverlight, you can <a href="http://ironpython.net/try/">try Python in your browser</a> now.</p>
<p>IronPython ships with a console virtually identical to the stand Python console.  The IronPython console provides me with a constant live connection directly to the API.  It&#8217;s very different and somewhat empowering to transition from the standard workflow in Visual Studio of write code/build/run to something more like a conversation with the code.  I think the term conversation is a very good analogy because it&#8217;s not just looking at classes and methods, it&#8217;s also data and interaction.  It&#8217;s experiencing everything all at once!</p>
<p>Let&#8217;s take a look at what I&#8217;m talking about.  To run these samples, I had <a href="http://ironpython.codeplex.com/releases/view/12482#DownloadId=96606">IronPython 2.6.1</a> installed on a server running Windows Server 2003 and MOSS 2007.</p>
<p>When you first start up the console, you need to reference the Microsoft.SharePoint .dll.  You SharePoint types probably know to find this in either the 12 Hive or the GAC.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&gt;&gt;&gt;</span> import clr
<span style="color: #000000; font-weight: bold;">&gt;&gt;&gt;</span> clr.AddReference<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #ff0000;">&quot;Microsoft.SharePoint&quot;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span></pre></div></div>

<p>We need to import the <a href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spsite.aspx">SPSite</a> class before we use it too.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&gt;&gt;&gt;</span> from Microsoft.SharePoint import SPSite</pre></div></div>

<p>Now we can create a connection to a site and open its default <a href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spweb.aspx">SPWeb</a> object.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&gt;&gt;&gt;</span> site = SPSite<span style="color: #7a0874; font-weight: bold;">&#40;</span>baseurl<span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #000000; font-weight: bold;">&gt;&gt;&gt;</span> web = site.OpenWeb<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #000000; font-weight: bold;">&gt;&gt;&gt;</span> web</pre></div></div>

<p>We can also navigate around the subwebs of a given web by using the <a href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spweb.webs(v=office.12).aspx">Webs</a> property.  You can run into permissions issues though.  Here we try to access the first subweb in the Webs collection.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&gt;&gt;&gt;</span> web.Webs<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">0</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>
Traceback <span style="color: #7a0874; font-weight: bold;">&#40;</span>most recent call <span style="color: #c20cb9; font-weight: bold;">last</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>:
File <span style="color: #ff0000;">&quot;&quot;</span>, line <span style="color: #000000;">1</span>, <span style="color: #000000; font-weight: bold;">in</span>
SystemError: Access is denied. <span style="color: #7a0874; font-weight: bold;">&#40;</span>Exception from HRESULT: 0x80070005 <span style="color: #7a0874; font-weight: bold;">&#40;</span>E_ACCESSDENI
ED<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span></pre></div></div>

<p>To get around this error, we can just use the <a href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spsite.systemaccount(v=office.12).aspx">SystemAccount</a> token attached to each site.  I really don&#8217;t know the reason behind the design of this API, but you can use one site reference to give you a connection with elevated privileges on another site.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&gt;&gt;&gt;</span> temp = SPSite<span style="color: #7a0874; font-weight: bold;">&#40;</span>baseurl<span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #000000; font-weight: bold;">&gt;&gt;&gt;</span> site = SPSite<span style="color: #7a0874; font-weight: bold;">&#40;</span>baseurl, temp.SystemAccount.UserToken<span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #000000; font-weight: bold;">&gt;&gt;&gt;</span> web = base_site.OpenWeb<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span></pre></div></div>

<p>Now you can start exploring around and seeing what exits.  When you want to see<br />
what members a given object has, you just use the <a href="http://docs.python.org/library/functions.html#dir">dir()</a> method.  Let&#8217;s take a look at<br />
the first object in the <a href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spweb.lists(v=office.12).aspx">Lists</a> collection.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&gt;&gt;&gt;</span> <span style="color: #c20cb9; font-weight: bold;">dir</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>base_web.Lists<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">0</span><span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #ff0000;">'AddWorkflowAssociation'</span>, <span style="color: #ff0000;">'AlertTemplate'</span>, <span style="color: #ff0000;">'AllRolesForCurrentUser'</span>, <span style="color: #ff0000;">'AllowCont
entTypes'</span>, <span style="color: #ff0000;">'AllowDeletion'</span>, <span style="color: #ff0000;">'AllowEveryoneViewItems'</span>, <span style="color: #ff0000;">'AllowMultiResponses'</span>, <span style="color: #ff0000;">'Al
lowRssFeeds'</span>, <span style="color: #ff0000;">'AnonymousPermMask'</span>, <span style="color: #ff0000;">'AnonymousPermMask64'</span>, <span style="color: #ff0000;">'Audit'</span>, <span style="color: #ff0000;">'Author'</span>, <span style="color: #ff0000;">'Ba
seTemplate'</span>, <span style="color: #ff0000;">'BaseType'</span>, <span style="color: #ff0000;">'BreakRoleInheritance'</span>, <span style="color: #ff0000;">'CanReceiveEmail'</span>, <span style="color: #ff0000;">'CheckPermis
sions'</span>, <span style="color: #ff0000;">'CheckedOutFiles'</span>, <span style="color: #ff0000;">'ContentTypes'</span>, <span style="color: #ff0000;">'ContentTypesEnabled'</span>, <span style="color: #ff0000;">'Created'</span>, <span style="color: #ff0000;">'Cu
rrentChangeToken'</span>, <span style="color: #ff0000;">'DefaultApprovalWorkflowId'</span>, <span style="color: #ff0000;">'DefaultContentApprovalWorkflowI
d'</span>, <span style="color: #ff0000;">'DefaultItemOpen'</span>, <span style="color: #ff0000;">'DefaultView'</span>, <span style="color: #ff0000;">'DefaultViewUrl'</span>, <span style="color: #ff0000;">'Delete'</span>, <span style="color: #ff0000;">'Description'</span>,
<span style="color: #ff0000;">'Direction'</span>, <span style="color: #ff0000;">'DocumentTemplateUrl'</span>, <span style="color: #ff0000;">'DoesUserHavePermissions'</span>, <span style="color: #ff0000;">'DraftVersionVis
ibility'</span>, <span style="color: #ff0000;">'EffectiveBasePermissions'</span>, <span style="color: #ff0000;">'EffectiveFolderPermissions'</span>, <span style="color: #ff0000;">'EmailAlias'</span>
, <span style="color: #ff0000;">'EmailInsertsFolder'</span>, <span style="color: #ff0000;">'EnableAssignToEmail'</span>, <span style="color: #ff0000;">'EnableAttachments'</span>, <span style="color: #ff0000;">'EnableDeplo
yWithDependentList'</span>, <span style="color: #ff0000;">'EnableDeployingList'</span>, <span style="color: #ff0000;">'EnableFolderCreation'</span>, <span style="color: #ff0000;">'EnableMinor
Versions'</span>, <span style="color: #ff0000;">'EnableModeration'</span>, <span style="color: #ff0000;">'EnableSchemaCaching'</span>, <span style="color: #ff0000;">'EnableSyndication'</span>, <span style="color: #ff0000;">'Enab
leVersioning'</span>, <span style="color: #ff0000;">'EnsurePropsFresh'</span>, <span style="color: #ff0000;">'EnsureRssSettings'</span>, <span style="color: #ff0000;">'Equals'</span>, <span style="color: #ff0000;">'EventReceiver
s'</span>, <span style="color: #ff0000;">'EventSinkAssembly'</span>, <span style="color: #ff0000;">'EventSinkClass'</span>, <span style="color: #ff0000;">'EventSinkData'</span>, <span style="color: #ff0000;">'ExcludeFromTemplate
'</span>, <span style="color: #ff0000;">'Fields'</span>, <span style="color: #ff0000;">'FirstUniqueAncestor'</span>, <span style="color: #ff0000;">'Folders'</span>, <span style="color: #ff0000;">'ForceCheckout'</span>, <span style="color: #ff0000;">'Forms'</span>, <span style="color: #ff0000;">'GetCha
nges'</span>, <span style="color: #ff0000;">'GetContentTypeIdByUrl'</span>, <span style="color: #ff0000;">'GetDefaultViewForContentType'</span>, <span style="color: #ff0000;">'GetDirectChildC
ontentType'</span>, <span style="color: #ff0000;">'GetDistinctFieldValues'</span>, <span style="color: #ff0000;">'GetHashCode'</span>, <span style="color: #ff0000;">'GetItemById'</span>, <span style="color: #ff0000;">'GetItemByU
niqueId'</span>, <span style="color: #ff0000;">'GetItems'</span>, <span style="color: #ff0000;">'GetItemsInFolder'</span>, <span style="color: #ff0000;">'GetPropertiesXmlForUncustomizedViews'</span>
, <span style="color: #ff0000;">'GetType'</span>, <span style="color: #ff0000;">'GetUncustomizedViewByBaseViewId'</span>, <span style="color: #ff0000;">'GetView'</span>, <span style="color: #ff0000;">'HasUniqueRoleAssignm
ents'</span>, <span style="color: #ff0000;">'Hidden'</span>, <span style="color: #ff0000;">'ID'</span>, <span style="color: #ff0000;">'ImageUrl'</span>, <span style="color: #ff0000;">'IrmEnabled'</span>, <span style="color: #ff0000;">'IrmExpire'</span>, <span style="color: #ff0000;">'IrmReject'</span>, <span style="color: #ff0000;">'IsCa
talog'</span>, <span style="color: #ff0000;">'IsContentTypeAllowed'</span>, <span style="color: #ff0000;">'ItemCount'</span>, <span style="color: #ff0000;">'Items'</span>, <span style="color: #ff0000;">'LastItemDeletedDate'</span>, <span style="color: #ff0000;">'La
stItemModifiedDate'</span>, <span style="color: #ff0000;">'Lists'</span>, <span style="color: #ff0000;">'MajorVersionLimit'</span>, <span style="color: #ff0000;">'MajorWithMinorVersionsLimit'</span>
, <span style="color: #ff0000;">'MemberwiseClone'</span>, <span style="color: #ff0000;">'MobileDefaultViewUrl'</span>, <span style="color: #ff0000;">'MultipleDataList'</span>, <span style="color: #ff0000;">'NoCrawl'</span>, <span style="color: #ff0000;">'OnQ
uickLaunch'</span>, <span style="color: #ff0000;">'Ordered'</span>, <span style="color: #ff0000;">'ParentWeb'</span>, <span style="color: #ff0000;">'ParentWebUrl'</span>, <span style="color: #ff0000;">'Permissions'</span>, <span style="color: #ff0000;">'PropertiesX
ml'</span>, <span style="color: #ff0000;">'ReadSecurity'</span>, <span style="color: #ff0000;">'Recycle'</span>, <span style="color: #ff0000;">'ReferenceEquals'</span>, <span style="color: #ff0000;">'RemoveWorkflowAssociation'</span>,
<span style="color: #ff0000;">'RenderAsHtml'</span>, <span style="color: #ff0000;">'RequestAccessEnabled'</span>, <span style="color: #ff0000;">'ResetRoleInheritance'</span>, <span style="color: #ff0000;">'RestrictedTempl
ateList'</span>, <span style="color: #ff0000;">'ReusableAcl'</span>, <span style="color: #ff0000;">'RoleAssignments'</span>, <span style="color: #ff0000;">'RootFolder'</span>, <span style="color: #ff0000;">'SaveAsTemplate'</span>, <span style="color: #ff0000;">'Sch
emaXml'</span>, <span style="color: #ff0000;">'SendToLocationName'</span>, <span style="color: #ff0000;">'SendToLocationUrl'</span>, <span style="color: #ff0000;">'ServerRelativeDocumentTempl
ateUrl'</span>, <span style="color: #ff0000;">'ServerTemplateCanCreateFolders'</span>, <span style="color: #ff0000;">'ServerTemplateCanReceiveEmail'</span>, <span style="color: #ff0000;">'Set
AttributesForPropertiesXML'</span>, <span style="color: #ff0000;">'ShowUser'</span>, <span style="color: #ff0000;">'TemplateFeatureId'</span>, <span style="color: #ff0000;">'Title'</span>, <span style="color: #ff0000;">'ToString
'</span>, <span style="color: #ff0000;">'Update'</span>, <span style="color: #ff0000;">'UpdateWorkflowAssociation'</span>, <span style="color: #ff0000;">'Version'</span>, <span style="color: #ff0000;">'Views'</span>, <span style="color: #ff0000;">'WorkflowAssociati
ons'</span>, <span style="color: #ff0000;">'WriteRssFeed'</span>, <span style="color: #ff0000;">'WriteSecurity'</span>, <span style="color: #ff0000;">'__class__'</span>, <span style="color: #ff0000;">'__delattr__'</span>, <span style="color: #ff0000;">'__doc__'</span>, <span style="color: #ff0000;">'_
_format__'</span>, <span style="color: #ff0000;">'__getattribute__'</span>, <span style="color: #ff0000;">'__hash__'</span>, <span style="color: #ff0000;">'__init__'</span>, <span style="color: #ff0000;">'__new__'</span>, <span style="color: #ff0000;">'__reduce__'</span>,
<span style="color: #ff0000;">'__reduce_ex__'</span>, <span style="color: #ff0000;">'__repr__'</span>, <span style="color: #ff0000;">'__setattr__'</span>, <span style="color: #ff0000;">'__sizeof__'</span>, <span style="color: #ff0000;">'__str__'</span>, <span style="color: #ff0000;">'__subclas
shook__'</span>, <span style="color: #ff0000;">'m_ListAttributesDict'</span>, <span style="color: #ff0000;">'m_Lists'</span>, <span style="color: #ff0000;">'m_Permissions'</span>, <span style="color: #ff0000;">'m_arrListProps'</span>,
<span style="color: #ff0000;">'m_iRow'</span><span style="color: #7a0874; font-weight: bold;">&#93;</span></pre></div></div>

<p>Now this may or may not be readable to you.  Alot of times when there&#8217;s a ton of text to deal with in the console, I&#8217;ll iterate through the methods and print them each on their own line.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&gt;&gt;&gt;</span> <span style="color: #000000; font-weight: bold;">for</span> method <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #c20cb9; font-weight: bold;">dir</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>base_web.Lists<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">0</span><span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>:
...     print method
...
AddWorkflowAssociation
AlertTemplate
AllRolesForCurrentUser
AllowContentTypes
AllowDeletion
AllowEveryoneViewItems
.... <span style="color: #7a0874; font-weight: bold;">&#91;</span>Omitted to save space<span style="color: #7a0874; font-weight: bold;">&#93;</span>
__class__
__delattr__
__doc__
__format__
__getattribute__
__hash__
__init__
__new__
__reduce__
__reduce_ex__
__repr__
__setattr__
__sizeof__
__str__
__subclasshook__
m_ListAttributesDict
m_Lists
m_Permissions
m_arrListProps
m_iRow</pre></div></div>

<p>You can inspect classes too.  You don&#8217;t need an instance.  If you inspect the class you&#8217;ll just need to import the type first.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&gt;&gt;&gt;</span> <span style="color: #000000; font-weight: bold;">for</span> method <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #c20cb9; font-weight: bold;">dir</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>SPListCollection<span style="color: #7a0874; font-weight: bold;">&#41;</span>:
...     print method
...
Traceback <span style="color: #7a0874; font-weight: bold;">&#40;</span>most recent call <span style="color: #c20cb9; font-weight: bold;">last</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>:
NameError: name <span style="color: #ff0000;">'SPListCollection'</span> is not defined
<span style="color: #000000; font-weight: bold;">&gt;&gt;&gt;</span> from Microsoft.SharePoint import SPListCollection
<span style="color: #000000; font-weight: bold;">&gt;&gt;&gt;</span> <span style="color: #000000; font-weight: bold;">for</span> method <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #c20cb9; font-weight: bold;">dir</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>SPListCollection<span style="color: #7a0874; font-weight: bold;">&#41;</span>:
...        print method
...
Add
CopyTo
... <span style="color: #7a0874; font-weight: bold;">&#91;</span>Omitted to save space<span style="color: #7a0874; font-weight: bold;">&#93;</span>
__add__
__class__
__delattr__
__doc__
__format__
__getattribute__
__getitem__
__hash__
__init__
__iter__
__len__
__new__
__reduce__
__reduce_ex__
__repr__
__setattr__
__sizeof__
__str__
__subclasshook__</pre></div></div>

<p>If you&#8217;re coming from a C# or VB background, you&#8217;re probably familiar with the &#8220;Using&#8221; block.  Python has something similar to that with the <a href="http://docs.python.org/whatsnew/2.6.html#pep-343-the-with-statement">&#8220;with&#8221; statement</a>.  The with statement is used with <a href="http://docs.python.org/whatsnew/2.6.html#writing-context-managers">ContextManagers</a>.  Many of the .Net framework classes support the ContextManager methods so you can use the with statement.  You can see the <a href="http://docs.python.org/reference/datamodel.html#object.__enter__">__enter__</a> and <a href="http://docs.python.org/reference/datamodel.html#object.__exit__">__exit__</a> methods below that help make this possible.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&gt;&gt;&gt;</span> <span style="color: #c20cb9; font-weight: bold;">dir</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>SPSite<span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #ff0000;">'AddWorkItem'</span>, <span style="color: #ff0000;">'AllWebs'</span>, ...<span style="color: #7a0874; font-weight: bold;">&#91;</span>Omitted <span style="color: #000000; font-weight: bold;">for</span> space<span style="color: #7a0874; font-weight: bold;">&#93;</span>, <span style="color: #ff0000;">'__class__'</span>, <span style="color: #ff0000;">'__delattr__'</span>, <span style="color: #ff0000;">'__doc__'</span>, <span style="color: #ff0000;">'__enter__
'</span>, <span style="color: #ff0000;">'__exit__'</span>, <span style="color: #ff0000;">'__format__'</span>, <span style="color: #ff0000;">'__getattribute__'</span>, <span style="color: #ff0000;">'__hash__'</span>, <span style="color: #ff0000;">'__init__'</span>, <span style="color: #ff0000;">'__new_
_'</span>, <span style="color: #ff0000;">'__reduce__'</span>, <span style="color: #ff0000;">'__reduce_ex__'</span>, <span style="color: #ff0000;">'__repr__'</span>, <span style="color: #ff0000;">'__setattr__'</span>, <span style="color: #ff0000;">'__sizeof__'</span>, <span style="color: #ff0000;">'__s
tr__'</span>, <span style="color: #ff0000;">'__subclasshook__'</span><span style="color: #7a0874; font-weight: bold;">&#93;</span></pre></div></div>

<p>Now we can refactor our earlier sample to use the with statement.  This is something I use more in scripts that reference MOSS 2007, but I thought you may find some uses.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&gt;&gt;&gt;</span> web = None
<span style="color: #000000; font-weight: bold;">&gt;&gt;&gt;</span> with SPSite<span style="color: #7a0874; font-weight: bold;">&#40;</span>baseurl<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #c20cb9; font-weight: bold;">as</span> temp:
... 	with SPSite<span style="color: #7a0874; font-weight: bold;">&#40;</span>baseurl, temp.SystemAccount.UserToken<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #c20cb9; font-weight: bold;">as</span> site:
...			web = site.OpenWeb<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
...</pre></div></div>

<p>It&#8217;s all pretty basic and the console lends itself well to those who like to explore. I really like this method versus digging around the object browser or Reflector all of the time.  I like the instant feedback when exploring and the ability to see data and not just structure.  I&#8217;ve also successfully used IronPython to create custom event handlers and for some administrative tasks for a 2003 to 2007 upgrade.  I highly recommend you try it if you find yourself having to do any development using the SharePoint API.</p>

<span class="slashdigglicious">
<a href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Fwww.ryanbrady.org%2F2010%2F04%2F13%2Fusing-ironpython-with-moss-2007%2F&amp;title=Using+IronPython+with+MOSS+2007" title="Slashdot It!"><img src="http://slashdot.org/favicon.ico" height="16" width="16" alt="[Slashdot]" /></a>
<a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.ryanbrady.org%2F2010%2F04%2F13%2Fusing-ironpython-with-moss-2007%2F&amp;title=Using+IronPython+with+MOSS+2007" title="Digg This Story"><img src="http://digg.com/favicon.ico" width="16" height="16" alt="[Digg]" /></a>
<a href="http://reddit.com/submit?url=http%3A%2F%2Fwww.ryanbrady.org%2F2010%2F04%2F13%2Fusing-ironpython-with-moss-2007%2F&amp;title=Using+IronPython+with+MOSS+2007" title="Reddit"><img src="http://reddit.com/favicon.ico" width="16" height="16" alt="[Reddit]" /></a>
<a href="http://del.icio.us/post?url=http%3A%2F%2Fwww.ryanbrady.org%2F2010%2F04%2F13%2Fusing-ironpython-with-moss-2007%2F&amp;title=Using+IronPython+with+MOSS+2007" title="Save to del.icio.us" onclick="window.open('http://del.icio.us/post?v=4&amp;noui&amp;jump=close&amp;url=http%3A%2F%2Fwww.ryanbrady.org%2F2010%2F04%2F13%2Fusing-ironpython-with-moss-2007%2F&amp;title=Using+IronPython+with+MOSS+2007', 'delicious', 'toolbar=no,width=700,height=400'); return false;"><img src="http://images.del.icio.us/static/img/delicious.small.gif" width="16" height="16" alt="[del.icio.us]" /></a>
<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.ryanbrady.org%2F2010%2F04%2F13%2Fusing-ironpython-with-moss-2007%2F" title="Share on Facebook"><img src="http://www.facebook.com/favicon.ico" width="16" height="16" alt="[Facebook]" /></a>
<a href="http://technorati.com/faves?add=http%3A%2F%2Fwww.ryanbrady.org%2F2010%2F04%2F13%2Fusing-ironpython-with-moss-2007%2F" title="Add to my Technorati Favorites"><img src="http://technorati.com/favicon.ico" width="16" height="16" alt="[Technorati]" /></a>
<a href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fwww.ryanbrady.org%2F2010%2F04%2F13%2Fusing-ironpython-with-moss-2007%2F&amp;title=Using+IronPython+with+MOSS+2007" title="Save to Google Bookmarks"><img src="http://www.google.com/favicon.ico" width="16" height="16" alt="[Google]" /></a>
<a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.ryanbrady.org%2F2010%2F04%2F13%2Fusing-ironpython-with-moss-2007%2F&amp;title=Using+IronPython+with+MOSS+2007" title="Stumble it!"><img src="http://www.stumbleupon.com/favicon.ico" width="16" height="16" alt="[StumbleUpon]" /></a>
</span>]]></content:encoded>
			<wfw:commentRss>http://www.ryanbrady.org/2010/04/13/using-ironpython-with-moss-2007/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Plugging Back Into The Grid</title>
		<link>http://www.ryanbrady.org/2010/01/19/plugging-back-into-the-grid/</link>
		<comments>http://www.ryanbrady.org/2010/01/19/plugging-back-into-the-grid/#comments</comments>
		<pubDate>Wed, 20 Jan 2010 04:21:58 +0000</pubDate>
		<dc:creator>ryan</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.ryanbrady.org/?p=256</guid>
		<description><![CDATA[I am finally writing another post after falling off the grid for a couple of months.  I had high hopes of writing a post every day in November, but the holidays combined with a full time job and paying side job keeping me up until 2AM or 3AM left me with little motivation to squeeze [...]]]></description>
				<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.ryanbrady.org%2F2010%2F01%2F19%2Fplugging-back-into-the-grid%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.ryanbrady.org%2F2010%2F01%2F19%2Fplugging-back-into-the-grid%2F&amp;source=rjbrady&amp;style=normal&amp;service=bit.ly&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>I am finally writing another post after falling off the grid for a couple of months.  I had high hopes of writing a post every day in November, but the holidays combined with a full time job and paying side job keeping me up until 2AM or 3AM left me with little motivation to squeeze out a post.  Yesterday I finally completed the project and so I&#8217;ve got some more time on my hands.</p>
<p>I&#8217;m not at liberty to announce the project yet, but it is something that will be public and it involves my favorite<a href="http://www.djangoproject.com" target="_blank"> web framework</a>. Once it launches officially I will provide some more details to how it was created.</p>
<p>So now I have a few things I&#8217;ll be working on.  They&#8217;re going to be including Django, jQuery, CouchDB, Amazon S3 and Rackspace Cloudfiles.  At work I&#8217;ve been busy creating a solution with and ASP.Net MVC front end, A MOSS 2007 backend and some custom workflow type components built with Iron Python.  Hopefully that will lead to some more interesting posts here.</p>

<span class="slashdigglicious">
<a href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Fwww.ryanbrady.org%2F2010%2F01%2F19%2Fplugging-back-into-the-grid%2F&amp;title=Plugging+Back+Into+The+Grid" title="Slashdot It!"><img src="http://slashdot.org/favicon.ico" height="16" width="16" alt="[Slashdot]" /></a>
<a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.ryanbrady.org%2F2010%2F01%2F19%2Fplugging-back-into-the-grid%2F&amp;title=Plugging+Back+Into+The+Grid" title="Digg This Story"><img src="http://digg.com/favicon.ico" width="16" height="16" alt="[Digg]" /></a>
<a href="http://reddit.com/submit?url=http%3A%2F%2Fwww.ryanbrady.org%2F2010%2F01%2F19%2Fplugging-back-into-the-grid%2F&amp;title=Plugging+Back+Into+The+Grid" title="Reddit"><img src="http://reddit.com/favicon.ico" width="16" height="16" alt="[Reddit]" /></a>
<a href="http://del.icio.us/post?url=http%3A%2F%2Fwww.ryanbrady.org%2F2010%2F01%2F19%2Fplugging-back-into-the-grid%2F&amp;title=Plugging+Back+Into+The+Grid" title="Save to del.icio.us" onclick="window.open('http://del.icio.us/post?v=4&amp;noui&amp;jump=close&amp;url=http%3A%2F%2Fwww.ryanbrady.org%2F2010%2F01%2F19%2Fplugging-back-into-the-grid%2F&amp;title=Plugging+Back+Into+The+Grid', 'delicious', 'toolbar=no,width=700,height=400'); return false;"><img src="http://images.del.icio.us/static/img/delicious.small.gif" width="16" height="16" alt="[del.icio.us]" /></a>
<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.ryanbrady.org%2F2010%2F01%2F19%2Fplugging-back-into-the-grid%2F" title="Share on Facebook"><img src="http://www.facebook.com/favicon.ico" width="16" height="16" alt="[Facebook]" /></a>
<a href="http://technorati.com/faves?add=http%3A%2F%2Fwww.ryanbrady.org%2F2010%2F01%2F19%2Fplugging-back-into-the-grid%2F" title="Add to my Technorati Favorites"><img src="http://technorati.com/favicon.ico" width="16" height="16" alt="[Technorati]" /></a>
<a href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fwww.ryanbrady.org%2F2010%2F01%2F19%2Fplugging-back-into-the-grid%2F&amp;title=Plugging+Back+Into+The+Grid" title="Save to Google Bookmarks"><img src="http://www.google.com/favicon.ico" width="16" height="16" alt="[Google]" /></a>
<a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.ryanbrady.org%2F2010%2F01%2F19%2Fplugging-back-into-the-grid%2F&amp;title=Plugging+Back+Into+The+Grid" title="Stumble it!"><img src="http://www.stumbleupon.com/favicon.ico" width="16" height="16" alt="[StumbleUpon]" /></a>
</span>]]></content:encoded>
			<wfw:commentRss>http://www.ryanbrady.org/2010/01/19/plugging-back-into-the-grid/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Exploring CouchDB</title>
		<link>http://www.ryanbrady.org/2009/11/04/exploring-couchdb/</link>
		<comments>http://www.ryanbrady.org/2009/11/04/exploring-couchdb/#comments</comments>
		<pubDate>Wed, 04 Nov 2009 12:18:49 +0000</pubDate>
		<dc:creator>ryan</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.ryanbrady.org/?p=247</guid>
		<description><![CDATA[Over the last week I&#8217;ve been reading a few articles about CouchDB and playing with some sample code.  Yesterday I read Eric Florenzano&#8217;s article on Using CouchDB with Django and it elevated my interest.  CouchDB is a a document-oriented database from Apache.  It can be queried and indexed in a MapReduce function in javascript.  CouchDB [...]]]></description>
				<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.ryanbrady.org%2F2009%2F11%2F04%2Fexploring-couchdb%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.ryanbrady.org%2F2009%2F11%2F04%2Fexploring-couchdb%2F&amp;source=rjbrady&amp;style=normal&amp;service=bit.ly&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>Over the last week I&#8217;ve been reading a few articles about CouchDB and playing with some sample code.  Yesterday I read <a href="http://twitter.com/ericflo" target="_blank">Eric Florenzano&#8217;s</a> article on Using CouchDB with Django and it elevated my interest.  <a href="http://couchdb.apache.org/" target="_blank">CouchDB</a> is a a document-oriented database from Apache.  It can be queried and indexed in a MapReduce function in javascript.  CouchDB also provides an incremental replication feature that finds and resolves conflicts bi-directionally.</p>
<p>Eric&#8217;s article provided an example of using CouchDB that didn&#8217;t fit what I was looking to do, but provided me with two key pieces of data; an example of using the python library for CouchDB and introducing me to an awesome project <a href="http://janl.github.com/couchdbx/" target="_blank">CouchDBX</a>.  CouchDBX is basically an InstantCouchDB for Mac OSX.  It was very easy to download and start using CouchDB immediately.</p>
<p>Unfortunately this post has no code sample.  I haven&#8217;t slayed CouchDB yet.  Whether I use a Python class that inherits from object or from the <a href="http://code.google.com/p/couchdb-python/" target="_blank">couchdb-python</a> library Document object, I end up with a json serialization error &#8220;&lt;object&gt; is not JSON serializable&#8221;.  It&#8217;s annoying, but there&#8217;s just something I&#8217;m still missing.  I&#8217;ll figure out (or some Google searching will).</p>
<p>I&#8217;m planning a demo at work.  Since I still work for a Microsoft based shop, most of these alternate technologies are like a traveling freak show from the circus for them.  I do see some places where CouchDB would work well, although security is an issue.  Where I work they want everything protected with CAC&#8217;s or certificates of some sort, so I&#8217;ll have to eventually look into how to do that with CouchDB.</p>
<p><strong>UPDATE:</strong></p>
<p>I was able to start storing data once I created a proper object.  It seems that a public property of a collection type isn&#8217;t json serializable.  I had a property &#8220;answers = []&#8221; and it was causing the serialization error.  Creating and updating data is working well now.  Time to tackle queries and then replication.</p>

<span class="slashdigglicious">
<a href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Fwww.ryanbrady.org%2F2009%2F11%2F04%2Fexploring-couchdb%2F&amp;title=Exploring+CouchDB" title="Slashdot It!"><img src="http://slashdot.org/favicon.ico" height="16" width="16" alt="[Slashdot]" /></a>
<a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.ryanbrady.org%2F2009%2F11%2F04%2Fexploring-couchdb%2F&amp;title=Exploring+CouchDB" title="Digg This Story"><img src="http://digg.com/favicon.ico" width="16" height="16" alt="[Digg]" /></a>
<a href="http://reddit.com/submit?url=http%3A%2F%2Fwww.ryanbrady.org%2F2009%2F11%2F04%2Fexploring-couchdb%2F&amp;title=Exploring+CouchDB" title="Reddit"><img src="http://reddit.com/favicon.ico" width="16" height="16" alt="[Reddit]" /></a>
<a href="http://del.icio.us/post?url=http%3A%2F%2Fwww.ryanbrady.org%2F2009%2F11%2F04%2Fexploring-couchdb%2F&amp;title=Exploring+CouchDB" title="Save to del.icio.us" onclick="window.open('http://del.icio.us/post?v=4&amp;noui&amp;jump=close&amp;url=http%3A%2F%2Fwww.ryanbrady.org%2F2009%2F11%2F04%2Fexploring-couchdb%2F&amp;title=Exploring+CouchDB', 'delicious', 'toolbar=no,width=700,height=400'); return false;"><img src="http://images.del.icio.us/static/img/delicious.small.gif" width="16" height="16" alt="[del.icio.us]" /></a>
<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.ryanbrady.org%2F2009%2F11%2F04%2Fexploring-couchdb%2F" title="Share on Facebook"><img src="http://www.facebook.com/favicon.ico" width="16" height="16" alt="[Facebook]" /></a>
<a href="http://technorati.com/faves?add=http%3A%2F%2Fwww.ryanbrady.org%2F2009%2F11%2F04%2Fexploring-couchdb%2F" title="Add to my Technorati Favorites"><img src="http://technorati.com/favicon.ico" width="16" height="16" alt="[Technorati]" /></a>
<a href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fwww.ryanbrady.org%2F2009%2F11%2F04%2Fexploring-couchdb%2F&amp;title=Exploring+CouchDB" title="Save to Google Bookmarks"><img src="http://www.google.com/favicon.ico" width="16" height="16" alt="[Google]" /></a>
<a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.ryanbrady.org%2F2009%2F11%2F04%2Fexploring-couchdb%2F&amp;title=Exploring+CouchDB" title="Stumble it!"><img src="http://www.stumbleupon.com/favicon.ico" width="16" height="16" alt="[StumbleUpon]" /></a>
</span>]]></content:encoded>
			<wfw:commentRss>http://www.ryanbrady.org/2009/11/04/exploring-couchdb/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dude I Got A&#8230;&#8230;&#8230;Mac</title>
		<link>http://www.ryanbrady.org/2009/11/02/dude-i-got-a-mac/</link>
		<comments>http://www.ryanbrady.org/2009/11/02/dude-i-got-a-mac/#comments</comments>
		<pubDate>Tue, 03 Nov 2009 02:30:03 +0000</pubDate>
		<dc:creator>ryan</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://www.ryanbrady.org/?p=240</guid>
		<description><![CDATA[This weekend we drove up to Raleigh for the simple pleasure of giving Apple, Inc. a handful of money. I&#8217;ve wanted one for over a year, but the timing or the budget just didn&#8217;t line up until now. We purchased an iMac last year as a &#8220;Shared Family&#8221; computer. Wrong. After 3 days, my wife [...]]]></description>
				<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.ryanbrady.org%2F2009%2F11%2F02%2Fdude-i-got-a-mac%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.ryanbrady.org%2F2009%2F11%2F02%2Fdude-i-got-a-mac%2F&amp;source=rjbrady&amp;style=normal&amp;service=bit.ly&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>This weekend we drove up to Raleigh for the simple pleasure of giving Apple, Inc. a handful of money.  I&#8217;ve wanted one for over a year, but the timing or the budget just didn&#8217;t line up until now.  We purchased an iMac last year as a &#8220;Shared Family&#8221; computer.  Wrong.  After 3 days, my wife decided it was hers and the rest of us were never to touch it.  Ever.</p>
<div class="wp-caption alignnone" style="width: 280px"><a href="http://whrrl.com/experience/story/18599877?sharer=17328205"><img title="First Mac" src="http://whrrl.com/media/image/7d1b063e-31a1-438f-b642-5ff222ede547?height=360&amp;width=540&amp;pad=false&amp;crop=false" alt="First Mac" width="270" height="360" /></a><p class="wp-caption-text">First Mac</p></div>
<p>I ended up getting the 2.53Ghz, with a 320GB HDD and 4GB of RAM.  I also purchased a wired keyboard with the number pad and a magic mouse.  The mouse is pretty good, like magic.  So far it&#8217;s been very easy to set up and use.</p>
<p>Now that I have the Mac I hope to take a little time to get to know the platform, try out some Obj-C, PyCocoa, and maybe try my hand at an iPhone app.  I&#8217;m very curious to see where this differs from my Linux platform.</p>
<p>If you want the play by play, here&#8217;s the <a title="Whrrl" href="http://whrrl.com/experience/story/18599877?sharer=17328205" target="_blank">Whrrl story</a> to document my experience.</p>

<span class="slashdigglicious">
<a href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Fwww.ryanbrady.org%2F2009%2F11%2F02%2Fdude-i-got-a-mac%2F&amp;title=Dude+I+Got+A%26%238230%3B%26%238230%3B%26%238230%3BMac" title="Slashdot It!"><img src="http://slashdot.org/favicon.ico" height="16" width="16" alt="[Slashdot]" /></a>
<a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.ryanbrady.org%2F2009%2F11%2F02%2Fdude-i-got-a-mac%2F&amp;title=Dude+I+Got+A%26%238230%3B%26%238230%3B%26%238230%3BMac" title="Digg This Story"><img src="http://digg.com/favicon.ico" width="16" height="16" alt="[Digg]" /></a>
<a href="http://reddit.com/submit?url=http%3A%2F%2Fwww.ryanbrady.org%2F2009%2F11%2F02%2Fdude-i-got-a-mac%2F&amp;title=Dude+I+Got+A%26%238230%3B%26%238230%3B%26%238230%3BMac" title="Reddit"><img src="http://reddit.com/favicon.ico" width="16" height="16" alt="[Reddit]" /></a>
<a href="http://del.icio.us/post?url=http%3A%2F%2Fwww.ryanbrady.org%2F2009%2F11%2F02%2Fdude-i-got-a-mac%2F&amp;title=Dude+I+Got+A%26%238230%3B%26%238230%3B%26%238230%3BMac" title="Save to del.icio.us" onclick="window.open('http://del.icio.us/post?v=4&amp;noui&amp;jump=close&amp;url=http%3A%2F%2Fwww.ryanbrady.org%2F2009%2F11%2F02%2Fdude-i-got-a-mac%2F&amp;title=Dude+I+Got+A%26%238230%3B%26%238230%3B%26%238230%3BMac', 'delicious', 'toolbar=no,width=700,height=400'); return false;"><img src="http://images.del.icio.us/static/img/delicious.small.gif" width="16" height="16" alt="[del.icio.us]" /></a>
<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.ryanbrady.org%2F2009%2F11%2F02%2Fdude-i-got-a-mac%2F" title="Share on Facebook"><img src="http://www.facebook.com/favicon.ico" width="16" height="16" alt="[Facebook]" /></a>
<a href="http://technorati.com/faves?add=http%3A%2F%2Fwww.ryanbrady.org%2F2009%2F11%2F02%2Fdude-i-got-a-mac%2F" title="Add to my Technorati Favorites"><img src="http://technorati.com/favicon.ico" width="16" height="16" alt="[Technorati]" /></a>
<a href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fwww.ryanbrady.org%2F2009%2F11%2F02%2Fdude-i-got-a-mac%2F&amp;title=Dude+I+Got+A%26%238230%3B%26%238230%3B%26%238230%3BMac" title="Save to Google Bookmarks"><img src="http://www.google.com/favicon.ico" width="16" height="16" alt="[Google]" /></a>
<a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.ryanbrady.org%2F2009%2F11%2F02%2Fdude-i-got-a-mac%2F&amp;title=Dude+I+Got+A%26%238230%3B%26%238230%3B%26%238230%3BMac" title="Stumble it!"><img src="http://www.stumbleupon.com/favicon.ico" width="16" height="16" alt="[StumbleUpon]" /></a>
</span>]]></content:encoded>
			<wfw:commentRss>http://www.ryanbrady.org/2009/11/02/dude-i-got-a-mac/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>November Blogging Thing</title>
		<link>http://www.ryanbrady.org/2009/11/01/november-blogging-thing/</link>
		<comments>http://www.ryanbrady.org/2009/11/01/november-blogging-thing/#comments</comments>
		<pubDate>Mon, 02 Nov 2009 02:44:43 +0000</pubDate>
		<dc:creator>ryan</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[blogging]]></category>
		<category><![CDATA[november]]></category>

		<guid isPermaLink="false">http://www.ryanbrady.org/?p=237</guid>
		<description><![CDATA[Ok so the annual November is the month for blogging thing is going on and this year I&#8217;m going to attempt it.  Like many other developers I don&#8217;t keep up with my blog as much as I should.  I don&#8217;t feel guilty about letting the reader down&#8230;.it&#8217;s not like I have a huge following anyway. [...]]]></description>
				<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.ryanbrady.org%2F2009%2F11%2F01%2Fnovember-blogging-thing%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.ryanbrady.org%2F2009%2F11%2F01%2Fnovember-blogging-thing%2F&amp;source=rjbrady&amp;style=normal&amp;service=bit.ly&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>Ok so the annual November is the month for blogging thing is going on and this year I&#8217;m going to attempt it.  Like many other developers I don&#8217;t keep up with my blog as much as I should.  I don&#8217;t feel guilty about letting the reader down&#8230;.it&#8217;s not like I have a huge following anyway.  The blog is more for me for getting out my ideas (somewhat cautiously still) and as a place to find things I need when I&#8217;ve forgotten.</p>
<p>So for the month of November, I will give it my best to write something daily.  It may not be long or particularly interesting but that&#8217;s not the goal!  Here&#8217;s to setting the bar low!</p>

<span class="slashdigglicious">
<a href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Fwww.ryanbrady.org%2F2009%2F11%2F01%2Fnovember-blogging-thing%2F&amp;title=November+Blogging+Thing" title="Slashdot It!"><img src="http://slashdot.org/favicon.ico" height="16" width="16" alt="[Slashdot]" /></a>
<a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.ryanbrady.org%2F2009%2F11%2F01%2Fnovember-blogging-thing%2F&amp;title=November+Blogging+Thing" title="Digg This Story"><img src="http://digg.com/favicon.ico" width="16" height="16" alt="[Digg]" /></a>
<a href="http://reddit.com/submit?url=http%3A%2F%2Fwww.ryanbrady.org%2F2009%2F11%2F01%2Fnovember-blogging-thing%2F&amp;title=November+Blogging+Thing" title="Reddit"><img src="http://reddit.com/favicon.ico" width="16" height="16" alt="[Reddit]" /></a>
<a href="http://del.icio.us/post?url=http%3A%2F%2Fwww.ryanbrady.org%2F2009%2F11%2F01%2Fnovember-blogging-thing%2F&amp;title=November+Blogging+Thing" title="Save to del.icio.us" onclick="window.open('http://del.icio.us/post?v=4&amp;noui&amp;jump=close&amp;url=http%3A%2F%2Fwww.ryanbrady.org%2F2009%2F11%2F01%2Fnovember-blogging-thing%2F&amp;title=November+Blogging+Thing', 'delicious', 'toolbar=no,width=700,height=400'); return false;"><img src="http://images.del.icio.us/static/img/delicious.small.gif" width="16" height="16" alt="[del.icio.us]" /></a>
<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.ryanbrady.org%2F2009%2F11%2F01%2Fnovember-blogging-thing%2F" title="Share on Facebook"><img src="http://www.facebook.com/favicon.ico" width="16" height="16" alt="[Facebook]" /></a>
<a href="http://technorati.com/faves?add=http%3A%2F%2Fwww.ryanbrady.org%2F2009%2F11%2F01%2Fnovember-blogging-thing%2F" title="Add to my Technorati Favorites"><img src="http://technorati.com/favicon.ico" width="16" height="16" alt="[Technorati]" /></a>
<a href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fwww.ryanbrady.org%2F2009%2F11%2F01%2Fnovember-blogging-thing%2F&amp;title=November+Blogging+Thing" title="Save to Google Bookmarks"><img src="http://www.google.com/favicon.ico" width="16" height="16" alt="[Google]" /></a>
<a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.ryanbrady.org%2F2009%2F11%2F01%2Fnovember-blogging-thing%2F&amp;title=November+Blogging+Thing" title="Stumble it!"><img src="http://www.stumbleupon.com/favicon.ico" width="16" height="16" alt="[StumbleUpon]" /></a>
</span>]]></content:encoded>
			<wfw:commentRss>http://www.ryanbrady.org/2009/11/01/november-blogging-thing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Scripting My Setup</title>
		<link>http://www.ryanbrady.org/2009/08/30/scripting-my-setup/</link>
		<comments>http://www.ryanbrady.org/2009/08/30/scripting-my-setup/#comments</comments>
		<pubDate>Sun, 30 Aug 2009 21:31:01 +0000</pubDate>
		<dc:creator>ryan</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.ryanbrady.org/?p=225</guid>
		<description><![CDATA[I&#8217;ve had the occasion to setup new Ubuntu environments several times over the last couple of months and out of laziness I created a simple script to install easy_install, pip, virtualenv, virtualenvwrapper and fabric.  I&#8217;m no bash ninja, but this script makes it quick and easy for me to install the python tools I need [...]]]></description>
				<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.ryanbrady.org%2F2009%2F08%2F30%2Fscripting-my-setup%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.ryanbrady.org%2F2009%2F08%2F30%2Fscripting-my-setup%2F&amp;source=rjbrady&amp;style=normal&amp;service=bit.ly&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>I&#8217;ve had the occasion to setup new Ubuntu environments several times over the last couple of months and out of laziness I created a simple script to install easy_install, pip, virtualenv, virtualenvwrapper and fabric.  I&#8217;m no bash ninja, but this script makes it quick and easy for me to install the python tools I need to play.  Sharing this with you is only half of my motivation; I&#8217;m also putting this here for someday when I forget it&#8230;</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/bash</span>
&nbsp;
<span style="color: #666666; font-style: italic;">#prerequisites</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> ensuring buid-essential and required dev headers are installed
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">aptitude</span> <span style="color: #c20cb9; font-weight: bold;">install</span> build-essential python2.5-dev python2.6-dev
&nbsp;
<span style="color: #666666; font-style: italic;">#easy_install</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> installing easy_install
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> ~<span style="color: #000000; font-weight: bold;">/</span>tmp_sources
<span style="color: #7a0874; font-weight: bold;">cd</span> tmp_sources
<span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>peak.telecommunity.com<span style="color: #000000; font-weight: bold;">/</span>dist<span style="color: #000000; font-weight: bold;">/</span>ez_setup.py
<span style="color: #c20cb9; font-weight: bold;">sudo</span> python ez_setup.py
<span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-rf</span> ez_setup.py
&nbsp;
<span style="color: #666666; font-style: italic;">#pip</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> installing pip
<span style="color: #c20cb9; font-weight: bold;">sudo</span> easy_install pip
&nbsp;
<span style="color: #666666; font-style: italic;">#fabric</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> installing fabric
<span style="color: #c20cb9; font-weight: bold;">sudo</span> pip <span style="color: #c20cb9; font-weight: bold;">install</span> fabric
&nbsp;
<span style="color: #666666; font-style: italic;">#virtualenv</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> installing virtualenv
<span style="color: #c20cb9; font-weight: bold;">sudo</span> pip <span style="color: #c20cb9; font-weight: bold;">install</span> virtualenv
<span style="color: #c20cb9; font-weight: bold;">sudo</span> pip <span style="color: #c20cb9; font-weight: bold;">install</span> virtualenvwrapper
&nbsp;
<span style="color: #666666; font-style: italic;">#clean up</span>
<span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-rf</span> ~<span style="color: #000000; font-weight: bold;">/</span>tmp_sources
<span style="color: #7a0874; font-weight: bold;">echo</span> all <span style="color: #000000; font-weight: bold;">done</span><span style="color: #000000; font-weight: bold;">!</span></pre></div></div>


<span class="slashdigglicious">
<a href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Fwww.ryanbrady.org%2F2009%2F08%2F30%2Fscripting-my-setup%2F&amp;title=Scripting+My+Setup" title="Slashdot It!"><img src="http://slashdot.org/favicon.ico" height="16" width="16" alt="[Slashdot]" /></a>
<a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.ryanbrady.org%2F2009%2F08%2F30%2Fscripting-my-setup%2F&amp;title=Scripting+My+Setup" title="Digg This Story"><img src="http://digg.com/favicon.ico" width="16" height="16" alt="[Digg]" /></a>
<a href="http://reddit.com/submit?url=http%3A%2F%2Fwww.ryanbrady.org%2F2009%2F08%2F30%2Fscripting-my-setup%2F&amp;title=Scripting+My+Setup" title="Reddit"><img src="http://reddit.com/favicon.ico" width="16" height="16" alt="[Reddit]" /></a>
<a href="http://del.icio.us/post?url=http%3A%2F%2Fwww.ryanbrady.org%2F2009%2F08%2F30%2Fscripting-my-setup%2F&amp;title=Scripting+My+Setup" title="Save to del.icio.us" onclick="window.open('http://del.icio.us/post?v=4&amp;noui&amp;jump=close&amp;url=http%3A%2F%2Fwww.ryanbrady.org%2F2009%2F08%2F30%2Fscripting-my-setup%2F&amp;title=Scripting+My+Setup', 'delicious', 'toolbar=no,width=700,height=400'); return false;"><img src="http://images.del.icio.us/static/img/delicious.small.gif" width="16" height="16" alt="[del.icio.us]" /></a>
<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.ryanbrady.org%2F2009%2F08%2F30%2Fscripting-my-setup%2F" title="Share on Facebook"><img src="http://www.facebook.com/favicon.ico" width="16" height="16" alt="[Facebook]" /></a>
<a href="http://technorati.com/faves?add=http%3A%2F%2Fwww.ryanbrady.org%2F2009%2F08%2F30%2Fscripting-my-setup%2F" title="Add to my Technorati Favorites"><img src="http://technorati.com/favicon.ico" width="16" height="16" alt="[Technorati]" /></a>
<a href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fwww.ryanbrady.org%2F2009%2F08%2F30%2Fscripting-my-setup%2F&amp;title=Scripting+My+Setup" title="Save to Google Bookmarks"><img src="http://www.google.com/favicon.ico" width="16" height="16" alt="[Google]" /></a>
<a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.ryanbrady.org%2F2009%2F08%2F30%2Fscripting-my-setup%2F&amp;title=Scripting+My+Setup" title="Stumble it!"><img src="http://www.stumbleupon.com/favicon.ico" width="16" height="16" alt="[StumbleUpon]" /></a>
</span>]]></content:encoded>
			<wfw:commentRss>http://www.ryanbrady.org/2009/08/30/scripting-my-setup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
