<?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>Randell&#039;s Blog &#187; Python</title>
	<atom:link href="http://blog.randell.ph/tag/python/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.randell.ph</link>
	<description>Software development, Fedora how-to&#039;s, and random stuff from the web</description>
	<lastBuildDate>Mon, 12 Dec 2011 01:54:07 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>UnacceptableVersionError: django 1.1 was requested, but 1.2.1.final.0 is already in use</title>
		<link>http://blog.randell.ph/2010/08/02/unacceptableversionerror-django-1-1-was-requested-but-1-2-1-final-0-is-already-in-use/</link>
		<comments>http://blog.randell.ph/2010/08/02/unacceptableversionerror-django-1-1-was-requested-but-1-2-1-final-0-is-already-in-use/#comments</comments>
		<pubDate>Mon, 02 Aug 2010 02:00:01 +0000</pubDate>
		<dc:creator>Randell</dc:creator>
				<category><![CDATA[Random]]></category>
		<category><![CDATA[Django]]></category>
		<category><![CDATA[easy_install]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[Google App Engine]]></category>
		<category><![CDATA[pip]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[setuptools]]></category>
		<category><![CDATA[virtualenv]]></category>

		<guid isPermaLink="false">http://blog.randell.ph/?p=1594</guid>
		<description><![CDATA[The Django version I have in my machine is 1.2.1, while one of my apps running on Google App Engine utilizes use_library to use Django 1.1. Apparently, Django versions later than 1.1 is not included in the Google App Engine SDK. So everytime I try to access my app on my dev machine, I get [...]
Related posts:<ol>
<li><a href='http://blog.randell.ph/2010/07/30/how-to-find-django-version/' rel='bookmark' title='How to find Django version'>How to find Django version</a></li>
<li><a href='http://blog.randell.ph/2010/04/04/setuptools/' rel='bookmark' title='Install setuptools in Fedora 12'>Install setuptools in Fedora 12</a></li>
<li><a href='http://blog.randell.ph/2009/09/17/install-idle-on-fedora-11/' rel='bookmark' title='Install IDLE on Fedora 11'>Install IDLE on Fedora 11</a></li>
<li><a href='http://blog.randell.ph/2010/04/03/convert-chm-to-pdf-in-fedora-linux/' rel='bookmark' title='Convert CHM to PDF in (Fedora) Linux'>Convert CHM to PDF in (Fedora) Linux</a></li>
</ol>]]></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%2Fblog.randell.ph%2F2010%2F08%2F02%2Funacceptableversionerror-django-1-1-was-requested-but-1-2-1-final-0-is-already-in-use%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.randell.ph%2F2010%2F08%2F02%2Funacceptableversionerror-django-1-1-was-requested-but-1-2-1-final-0-is-already-in-use%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p><a title="How to find Django version" href="http://blog.randell.ph/2010/07/30/how-to-find-django-version/" target="_blank">The Django version I have in my machine is 1.2.1</a>, while one of my apps running on Google App Engine utilizes <code>use_library</code> to use Django 1.1. Apparently, <a title="Third-party Python Libraries - Django" href="http://code.google.com/appengine/docs/python/tools/libraries.html#Django" target="_blank">Django versions later than 1.1 is not included in the Google App Engine SDK</a>. So everytime I try to access my app on my dev machine, I get this error:</p>
<blockquote><p>UnacceptableVersionError: django 1.1 was requested, but 1.2.1.final.0 is already in use</p></blockquote>
<p>I can probably downgrade the version of Django in my machine, but that would mean all my other apps will have to use the downgraded Django version as well. And I don&#8217;t want that, since I want to use the latest version whenever possible. So one possible solution is to use virtualenv for my Google App Engine app. Virtualenv allows the creation of isolated Python environment, which is exactly what I need.</p>
<p>First, we need to install virtualenv. In Fedora, we can install virtualenv by executing the following command as root:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">yum <span style="color: #c20cb9; font-weight: bold;">install</span> python-virtualenv</pre></div></div>

<p>Next, we use virtualenv to create an environment that has its own installation directories, that doesn&#8217;t share libraries with other virtualenv environments. We can even choose to not use other globally installed libraries. To do that, execute the following command:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">virtualenv <span style="color: #660033;">--no-site-packages</span> ENV</pre></div></div>

<p><code>ENV</code> here is the directory of our new environment. This also creates <code>ENV/lib/python2.6/site-packages</code> on Python 2.6, where any libraries that will be installed will go. This also creates <code>ENV/bin/python</code>, which is a Python interpreter that uses this environment. Anytime this interpreter is used, the libraries in this environment will be used. The command also installs <a title="Setuptools" href="http://blog.randell.ph/2010/04/04/setuptools/" target="_blank">Setuptools</a> for the environment, and if <code>ENV/bin/easy_install</code> is used the packages will be installed into the environment.</p>
<p>The <code>--no-packages</code> option during the build causes the environment to not inherit any packages from <code>/usr/lib/python2.6/site-packages</code>. This is useful if we don&#8217;t want to depend on the packages there or simply want more isolation from the global system.</p>
<p>Next, we&#8217;ll use <a title="pip installs packages" href="http://pypi.python.org/pypi/pip" target="_blank">pip</a> to install the necessary packages in our virtualenv environment. Of course, we need to have pip installed in our system first. In Fedora, we can install pip by executing the following command as root:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">yum <span style="color: #c20cb9; font-weight: bold;">install</span> python-pip</pre></div></div>

<p>And then installed the Django version we need into the environment:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">pip <span style="color: #c20cb9; font-weight: bold;">install</span> <span style="color: #660033;">-E</span> ENV <span style="color: #007800;">Django</span>==<span style="color: #000000;">1.1</span></pre></div></div>

<p>To use our new environment, we need to activate it with the following command:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">source</span> ENV<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>activate</pre></div></div>

<p>Copy the Google App Engine SDK to our new environment and then run our Google App Engine app from that environment like</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">~<span style="color: #000000; font-weight: bold;">/</span>ENV<span style="color: #000000; font-weight: bold;">/</span>google_appengine<span style="color: #000000; font-weight: bold;">/</span>dev_appserver.py ~<span style="color: #000000; font-weight: bold;">/</span>path<span style="color: #000000; font-weight: bold;">/</span>to<span style="color: #000000; font-weight: bold;">/</span>app</pre></div></div>

<p>You can follow the same steps to create isolated environments for each of your Python projects.</p>
<p>Related posts:<ol>
<li><a href='http://blog.randell.ph/2010/07/30/how-to-find-django-version/' rel='bookmark' title='How to find Django version'>How to find Django version</a></li>
<li><a href='http://blog.randell.ph/2010/04/04/setuptools/' rel='bookmark' title='Install setuptools in Fedora 12'>Install setuptools in Fedora 12</a></li>
<li><a href='http://blog.randell.ph/2009/09/17/install-idle-on-fedora-11/' rel='bookmark' title='Install IDLE on Fedora 11'>Install IDLE on Fedora 11</a></li>
<li><a href='http://blog.randell.ph/2010/04/03/convert-chm-to-pdf-in-fedora-linux/' rel='bookmark' title='Convert CHM to PDF in (Fedora) Linux'>Convert CHM to PDF in (Fedora) Linux</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.randell.ph/2010/08/02/unacceptableversionerror-django-1-1-was-requested-but-1-2-1-final-0-is-already-in-use/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>How to find Django version</title>
		<link>http://blog.randell.ph/2010/07/30/how-to-find-django-version/</link>
		<comments>http://blog.randell.ph/2010/07/30/how-to-find-django-version/#comments</comments>
		<pubDate>Thu, 29 Jul 2010 17:12:52 +0000</pubDate>
		<dc:creator>Randell</dc:creator>
				<category><![CDATA[Random]]></category>
		<category><![CDATA[Django]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://blog.randell.ph/?p=1603</guid>
		<description><![CDATA[There are cases when you would want to know the version of Django that is being used in your Python installation. To do that, go to your Python console and execute the following commands: &#62;&#62;&#62; import django &#62;&#62;&#62; django.VERSION In my machine, it showed the following: &#40;1, 2, 1, 'final', 0&#41; Related posts: UnacceptableVersionError: django [...]
Related posts:<ol>
<li><a href='http://blog.randell.ph/2010/08/02/unacceptableversionerror-django-1-1-was-requested-but-1-2-1-final-0-is-already-in-use/' rel='bookmark' title='UnacceptableVersionError: django 1.1 was requested, but 1.2.1.final.0 is already in use'>UnacceptableVersionError: django 1.1 was requested, but 1.2.1.final.0 is already in use</a></li>
</ol>]]></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%2Fblog.randell.ph%2F2010%2F07%2F30%2Fhow-to-find-django-version%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.randell.ph%2F2010%2F07%2F30%2Fhow-to-find-django-version%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>There are cases when you would want to know the version of Django that is being used in your Python installation. To do that, go to your Python console and execute the following commands:</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #66cc66;">&gt;&gt;&gt;</span> <span style="color: #ff7700;font-weight:bold;">import</span> django
<span style="color: #66cc66;">&gt;&gt;&gt;</span> django.<span style="color: black;">VERSION</span></pre></div></div>

<p>In my machine, it showed the following:</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: black;">&#40;</span><span style="color: #ff4500;">1</span>, <span style="color: #ff4500;">2</span>, <span style="color: #ff4500;">1</span>, <span style="color: #483d8b;">'final'</span>, <span style="color: #ff4500;">0</span><span style="color: black;">&#41;</span></pre></div></div>

<p>Related posts:<ol>
<li><a href='http://blog.randell.ph/2010/08/02/unacceptableversionerror-django-1-1-was-requested-but-1-2-1-final-0-is-already-in-use/' rel='bookmark' title='UnacceptableVersionError: django 1.1 was requested, but 1.2.1.final.0 is already in use'>UnacceptableVersionError: django 1.1 was requested, but 1.2.1.final.0 is already in use</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.randell.ph/2010/07/30/how-to-find-django-version/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Using GAE Testbed with GAEUnit: Testing that email was sent</title>
		<link>http://blog.randell.ph/2010/04/05/using-gae-testbed-with-gaeunit-testing-that-email-was-sent/</link>
		<comments>http://blog.randell.ph/2010/04/05/using-gae-testbed-with-gaeunit-testing-that-email-was-sent/#comments</comments>
		<pubDate>Sun, 04 Apr 2010 19:07:26 +0000</pubDate>
		<dc:creator>Randell</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[gae-testbed]]></category>
		<category><![CDATA[GAEUnit]]></category>
		<category><![CDATA[Google App Engine]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[unit testing]]></category>

		<guid isPermaLink="false">http://blog.randell.ph/?p=1239</guid>
		<description><![CDATA[In my quest for testing if emails are being sent by my app engine app, I came across GAE Testbed.  GAE Testbed &#8230; is a set of base test cases to make it simple to test the more complicated pieces of AppEngine&#8217;s framework (such as sending E-mail messages, the datastore, Memcache, etc.) Since I&#8217;m already using [...]
Related posts:<ol>
<li><a href='http://blog.randell.ph/2010/04/01/thoughts-and-notes-on-unit-testing/' rel='bookmark' title='Thoughts and notes on unit testing'>Thoughts and notes on unit testing</a></li>
</ol>]]></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%2Fblog.randell.ph%2F2010%2F04%2F05%2Fusing-gae-testbed-with-gaeunit-testing-that-email-was-sent%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.randell.ph%2F2010%2F04%2F05%2Fusing-gae-testbed-with-gaeunit-testing-that-email-was-sent%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>In my quest for testing if emails are being sent by my app engine app, I came across <a title="GAE Testbed" href="http://code.google.com/p/gae-testbed/" target="_blank">GAE Testbed</a>.  GAE Testbed</p>
<blockquote><p>&#8230; is a set of base test cases to make it simple to test the more complicated pieces of AppEngine&#8217;s framework (such as sending E-mail messages, the datastore, Memcache, etc.)</p></blockquote>
<p>Since I&#8217;m already using GAEUnit as the unit testing framework for my app, I wanted to use GAE Testbed alongside GAEUnit so I only had to call one command (http://localhost:8080/test) to execute all my tests.  The documentation from the GAE Testbed home page is written to make it work alongside NoseGAE, so I decided to write one for GAEUnit.</p>
<p>Add GAEUnit to your app:</p>
<ol>
<li>Download <a title="GAEUnit" href="http://gaeunit.googlecode.com/files/gaeunit-1.2.8.zip" target="_blank">the zipped archive of GAEUnit</a> from <a title="GAEUnit" href="http://code.google.com/p/gaeunit/" target="_blank">its Google Code project hosting page</a>.</li>
<li>Extract the archive.</li>
<li>From the folder extracted from the archive, copy <code>gaeunit.py</code> to your app&#8217;s root folder.</li>
<li>Add the following 2 lines to your app.yaml, directly below the line that says <code>handlers:</code>:
<pre>- url: /test.*
  script: gaeunit.py</pre>
</li>
<li>(Optional) From the folder extracted from the archive, there&#8217;s a folder named <code>sample_app</code> and inside it is the modified version of the <code>webtest</code> module. Copy the <code>webtest</code> module (the entire folder containing <code>debugapp.py</code> and <code>__init__.py</code>) to the root of your app.</li>
</ol>
<p>Add GAE Testbed to GAEUnit:</p>
<ol>
<li>Download <a title="GAE Testbed" href="http://gae-testbed.googlecode.com/files/gaetestbed-0.12dev-r30.tar.gz" target="_blank">the GAE Testbed tar gzipped archive</a> from <a title="GAE Testbed" href="http://code.google.com/p/gae-testbed/" target="_blank">its Google Code project hosting page</a>.</li>
<li>Extract the archive.</li>
<li>Inside the extracted archive is the <code>gaetestbed</code> module (it&#8217;s the folder named &#8220;gaetestbed&#8221;).  Copy the module to the root of your app.</li>
<li>Create a file inside the <code>test</code> folder of the root of your app. For the sake of this example, let&#8217;s name it <code>test_mailer.py</code>.</li>
<li>Using the example from the GAE Testbed Google Code project hosting page, add the following lines to <code>test_mailer.py</code>:

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">unittest</span>
<span style="color: #ff7700;font-weight:bold;">from</span> gaetestbed <span style="color: #ff7700;font-weight:bold;">import</span> MailTestCase
&nbsp;
<span style="color: #ff7700;font-weight:bold;">class</span> MyTestCase<span style="color: black;">&#40;</span>MailTestCase, <span style="color: #dc143c;">unittest</span>.<span style="color: black;">TestCase</span><span style="color: black;">&#41;</span>:
    <span style="color: #ff7700;font-weight:bold;">def</span> test_email_sent<span style="color: black;">&#40;</span><span style="color: #008000;">self</span><span style="color: black;">&#41;</span>:
        send_email_to<span style="color: black;">&#40;</span><span style="color: #483d8b;">'test@example.org'</span><span style="color: black;">&#41;</span> <span style="color: #808080; font-style: italic;"># Some method that sends e-mail...</span>
        <span style="color: #008000;">self</span>.<span style="color: black;">assertEmailSent</span><span style="color: black;">&#40;</span>to=<span style="color: #483d8b;">'test@example.org'</span><span style="color: black;">&#41;</span>
        <span style="color: #008000;">self</span>.<span style="color: black;">assertEqual</span><span style="color: black;">&#40;</span><span style="color: #008000;">len</span><span style="color: black;">&#40;</span><span style="color: #008000;">self</span>.<span style="color: black;">get_sent_messages</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>, <span style="color: #ff4500;">1</span><span style="color: black;">&#41;</span></pre></div></div>

</li>
</ol>
<p>Start your server and go to http://localhost:8080/test. You should notice that (an additional) 1/1 test was ran from http://localhost:8080/test.</p>
<p><em>* Many thanks to </em><em><a title="John Geewax" href="http://code.google.com/u/jgeewax/" target="_blank">John Geewax</a> for creating GAE Testbed.</em></p>
<p>Related posts:<ol>
<li><a href='http://blog.randell.ph/2010/04/01/thoughts-and-notes-on-unit-testing/' rel='bookmark' title='Thoughts and notes on unit testing'>Thoughts and notes on unit testing</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.randell.ph/2010/04/05/using-gae-testbed-with-gaeunit-testing-that-email-was-sent/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Install setuptools in Fedora 12</title>
		<link>http://blog.randell.ph/2010/04/04/setuptools/</link>
		<comments>http://blog.randell.ph/2010/04/04/setuptools/#comments</comments>
		<pubDate>Sun, 04 Apr 2010 11:37:07 +0000</pubDate>
		<dc:creator>Randell</dc:creator>
				<category><![CDATA[Fedora]]></category>
		<category><![CDATA[How-to]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Easy Install]]></category>
		<category><![CDATA[easy_install]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[setuptools]]></category>

		<guid isPermaLink="false">http://blog.randell.ph/?p=1236</guid>
		<description><![CDATA[From the Python Package Index page, setuptools allows you to Download, build, install, upgrade, and uninstall Python packages &#8212; easily! The PEAK Development Center, setuptools &#8230; is a collection of enhancements to the Python distutils (for Python 2.3.5 and up on most platforms; 64-bit platforms require a minimum of Python 2.4) that allow you to more [...]
Related posts:<ol>
<li><a href='http://blog.randell.ph/2009/09/17/install-idle-on-fedora-11/' rel='bookmark' title='Install IDLE on Fedora 11'>Install IDLE on Fedora 11</a></li>
<li><a href='http://blog.randell.ph/2010/08/02/unacceptableversionerror-django-1-1-was-requested-but-1-2-1-final-0-is-already-in-use/' rel='bookmark' title='UnacceptableVersionError: django 1.1 was requested, but 1.2.1.final.0 is already in use'>UnacceptableVersionError: django 1.1 was requested, but 1.2.1.final.0 is already in use</a></li>
<li><a href='http://blog.randell.ph/2010/04/03/convert-chm-to-pdf-in-fedora-linux/' rel='bookmark' title='Convert CHM to PDF in (Fedora) Linux'>Convert CHM to PDF in (Fedora) Linux</a></li>
<li><a href='http://blog.randell.ph/2009/09/01/install-handbrake-on-fedora-11/' rel='bookmark' title='Install Handbrake on Fedora 11'>Install Handbrake on Fedora 11</a></li>
<li><a href='http://blog.randell.ph/2009/07/26/install-sqlite-database-browser-on-fedora/' rel='bookmark' title='Install SQLite Database Browser on Fedora'>Install SQLite Database Browser on Fedora</a></li>
</ol>]]></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%2Fblog.randell.ph%2F2010%2F04%2F04%2Fsetuptools%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.randell.ph%2F2010%2F04%2F04%2Fsetuptools%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>From <a title="setuptools" href="http://pypi.python.org/pypi/setuptools" target="_blank">the Python Package Index page</a>, setuptools allows you to</p>
<blockquote><p>Download, build, install, upgrade, and uninstall Python packages &#8212; easily!</p></blockquote>
<p><a title="The PEAK Development Center" href="http://peak.telecommunity.com/DevCenter/setuptools" target="_blank">The PEAK Development Center</a>, setuptools</p>
<blockquote><p>&#8230; is a collection of enhancements to the Python <tt>distutils</tt> (for Python 2.3.5 and up on most platforms; 64-bit platforms require a minimum of Python 2.4) that allow you to more easily build and distribute Python packages, especially ones that have dependencies on other packages.</p></blockquote>
<p>To install setuptools in Fedora 12, run the following command as root:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">yum <span style="color: #c20cb9; font-weight: bold;">install</span> python-setuptools python-setuptools-devel</pre></div></div>

<p>Related posts:<ol>
<li><a href='http://blog.randell.ph/2009/09/17/install-idle-on-fedora-11/' rel='bookmark' title='Install IDLE on Fedora 11'>Install IDLE on Fedora 11</a></li>
<li><a href='http://blog.randell.ph/2010/08/02/unacceptableversionerror-django-1-1-was-requested-but-1-2-1-final-0-is-already-in-use/' rel='bookmark' title='UnacceptableVersionError: django 1.1 was requested, but 1.2.1.final.0 is already in use'>UnacceptableVersionError: django 1.1 was requested, but 1.2.1.final.0 is already in use</a></li>
<li><a href='http://blog.randell.ph/2010/04/03/convert-chm-to-pdf-in-fedora-linux/' rel='bookmark' title='Convert CHM to PDF in (Fedora) Linux'>Convert CHM to PDF in (Fedora) Linux</a></li>
<li><a href='http://blog.randell.ph/2009/09/01/install-handbrake-on-fedora-11/' rel='bookmark' title='Install Handbrake on Fedora 11'>Install Handbrake on Fedora 11</a></li>
<li><a href='http://blog.randell.ph/2009/07/26/install-sqlite-database-browser-on-fedora/' rel='bookmark' title='Install SQLite Database Browser on Fedora'>Install SQLite Database Browser on Fedora</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.randell.ph/2010/04/04/setuptools/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Convert CHM to PDF in (Fedora) Linux</title>
		<link>http://blog.randell.ph/2010/04/03/convert-chm-to-pdf-in-fedora-linux/</link>
		<comments>http://blog.randell.ph/2010/04/03/convert-chm-to-pdf-in-fedora-linux/#comments</comments>
		<pubDate>Fri, 02 Apr 2010 18:47:24 +0000</pubDate>
		<dc:creator>Randell</dc:creator>
				<category><![CDATA[Fedora]]></category>
		<category><![CDATA[How-to]]></category>
		<category><![CDATA[CHM]]></category>
		<category><![CDATA[chm2pdf]]></category>
		<category><![CDATA[chmlib]]></category>
		<category><![CDATA[chmsee]]></category>
		<category><![CDATA[htmldoc]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[PDF]]></category>
		<category><![CDATA[pychm]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[python-chm]]></category>

		<guid isPermaLink="false">http://blog.randell.ph/?p=1075</guid>
		<description><![CDATA[I&#8217;ve been looking for a way to print CHM files in (Fedora) Linux, since my CHM file viewer, chmsee, doesn&#8217;t have a print option (and probably all other CHM file viewers as well). Searching for CHM to PDF converters in Fedora led me to chm2pdf. chm2pdf has a couple of requirements: chmlib pychm htmldoc To [...]
Related posts:<ol>
<li><a href='http://blog.randell.ph/2010/10/11/setup-zend-command-line-console-tool-in-fedora-linux/' rel='bookmark' title='Setup Zend Command Line Console Tool in Fedora Linux'>Setup Zend Command Line Console Tool in Fedora Linux</a></li>
<li><a href='http://blog.randell.ph/2010/06/11/convert-mkv-to-avi-using-winff-on-fedora/' rel='bookmark' title='Convert MKV to AVI using WinFF on Fedora'>Convert MKV to AVI using WinFF on Fedora</a></li>
<li><a href='http://blog.randell.ph/2010/04/04/setuptools/' rel='bookmark' title='Install setuptools in Fedora 12'>Install setuptools in Fedora 12</a></li>
<li><a href='http://blog.randell.ph/2009/07/26/install-sqlite-database-browser-on-fedora/' rel='bookmark' title='Install SQLite Database Browser on Fedora'>Install SQLite Database Browser on Fedora</a></li>
<li><a href='http://blog.randell.ph/2011/12/05/how-to-install-att-global-network-client-on-fedora-16/' rel='bookmark' title='How to install AT&amp;T Global Network Client on Fedora 16'>How to install AT&#038;T Global Network Client on Fedora 16</a></li>
</ol>]]></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%2Fblog.randell.ph%2F2010%2F04%2F03%2Fconvert-chm-to-pdf-in-fedora-linux%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.randell.ph%2F2010%2F04%2F03%2Fconvert-chm-to-pdf-in-fedora-linux%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>I&#8217;ve been looking for a way to print CHM files in (Fedora) Linux, since my CHM file viewer, <a title="chmsee" href="http://code.google.com/p/chmsee/" target="_blank">chmsee</a>, doesn&#8217;t have a print option (and probably all other CHM file viewers as well). Searching for CHM to PDF converters in Fedora led me to <a title="chm2pdf" href="http://code.google.com/p/chm2pdf/" target="_blank">chm2pdf</a>.</p>
<p>chm2pdf has a couple of requirements:</p>
<ul>
<li>chmlib</li>
<li>pychm</li>
<li>htmldoc</li>
</ul>
<p>To install the necessary packages, execute this command in your terminal as root:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">yum <span style="color: #c20cb9; font-weight: bold;">install</span> chmlib python-chm htmldoc</pre></div></div>

<p>To install chm2pdf:</p>
<ol>
<li>Download the archive from <a title="chm2pdf" href="http://code.google.com/p/chm2pdf/" target="_blank">it&#8217;s Google Code project hosting page</a>.</li>
<li>Extract the archive</li>
<li>As root, type

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">python setup.py <span style="color: #c20cb9; font-weight: bold;">install</span></pre></div></div>

<p>from the directory extracted from the archive</li>
</ol>
<p>I got the following message after running the last command:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">running <span style="color: #c20cb9; font-weight: bold;">install</span>
running build
running build_scripts
creating build
creating build<span style="color: #000000; font-weight: bold;">/</span>scripts-<span style="color: #000000;">2.6</span>
copying and adjusting chm2pdf -<span style="color: #000000; font-weight: bold;">&amp;</span>gt; build<span style="color: #000000; font-weight: bold;">/</span>scripts-<span style="color: #000000;">2.6</span>
changing mode of build<span style="color: #000000; font-weight: bold;">/</span>scripts-<span style="color: #000000;">2.6</span><span style="color: #000000; font-weight: bold;">/</span>chm2pdf from <span style="color: #000000;">644</span> to <span style="color: #000000;">755</span>
running install_scripts
copying build<span style="color: #000000; font-weight: bold;">/</span>scripts-<span style="color: #000000;">2.6</span><span style="color: #000000; font-weight: bold;">/</span>chm2pdf -<span style="color: #000000; font-weight: bold;">&amp;</span>gt; <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin
changing mode of <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>chm2pdf to <span style="color: #000000;">755</span>
running install_egg_info
Writing <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>python2.6<span style="color: #000000; font-weight: bold;">/</span>site-packages<span style="color: #000000; font-weight: bold;">/</span>chm2pdf-<span style="color: #000000;">0.9</span>-py2.6.egg-info</pre></div></div>

<p>I tested the installation with the following command and it produced the PDF file:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">chm2pdf <span style="color: #660033;">--webpage</span> somefile.chm</pre></div></div>

<p>Related posts:<ol>
<li><a href='http://blog.randell.ph/2010/10/11/setup-zend-command-line-console-tool-in-fedora-linux/' rel='bookmark' title='Setup Zend Command Line Console Tool in Fedora Linux'>Setup Zend Command Line Console Tool in Fedora Linux</a></li>
<li><a href='http://blog.randell.ph/2010/06/11/convert-mkv-to-avi-using-winff-on-fedora/' rel='bookmark' title='Convert MKV to AVI using WinFF on Fedora'>Convert MKV to AVI using WinFF on Fedora</a></li>
<li><a href='http://blog.randell.ph/2010/04/04/setuptools/' rel='bookmark' title='Install setuptools in Fedora 12'>Install setuptools in Fedora 12</a></li>
<li><a href='http://blog.randell.ph/2009/07/26/install-sqlite-database-browser-on-fedora/' rel='bookmark' title='Install SQLite Database Browser on Fedora'>Install SQLite Database Browser on Fedora</a></li>
<li><a href='http://blog.randell.ph/2011/12/05/how-to-install-att-global-network-client-on-fedora-16/' rel='bookmark' title='How to install AT&amp;T Global Network Client on Fedora 16'>How to install AT&#038;T Global Network Client on Fedora 16</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.randell.ph/2010/04/03/convert-chm-to-pdf-in-fedora-linux/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Thoughts and notes on unit testing</title>
		<link>http://blog.randell.ph/2010/04/01/thoughts-and-notes-on-unit-testing/</link>
		<comments>http://blog.randell.ph/2010/04/01/thoughts-and-notes-on-unit-testing/#comments</comments>
		<pubDate>Wed, 31 Mar 2010 22:25:00 +0000</pubDate>
		<dc:creator>Randell</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[GAEUnit]]></category>
		<category><![CDATA[Google App Engine]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[unit testing]]></category>

		<guid isPermaLink="false">http://blog.randell.ph/?p=1059</guid>
		<description><![CDATA[I&#8217;m not a fan of unit testing. As a matter of fact, I have never written any unit tests in my career. Well, I almost did for one of my previous projects that was growing huge, but the client was more interested in seeing the functional requirements met over the non-functional ones (probably because they [...]
Related posts:<ol>
<li><a href='http://blog.randell.ph/2010/04/05/using-gae-testbed-with-gaeunit-testing-that-email-was-sent/' rel='bookmark' title='Using GAE Testbed with GAEUnit: Testing that email was sent'>Using GAE Testbed with GAEUnit: Testing that email was sent</a></li>
<li><a href='http://blog.randell.ph/2009/11/13/postgresql-notes/' rel='bookmark' title='PostgreSQL notes'>PostgreSQL notes</a></li>
</ol>]]></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%2Fblog.randell.ph%2F2010%2F04%2F01%2Fthoughts-and-notes-on-unit-testing%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.randell.ph%2F2010%2F04%2F01%2Fthoughts-and-notes-on-unit-testing%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>I&#8217;m not a fan of unit testing. As a matter of fact, I have never written any unit tests in my career. Well, I almost did for one of my previous projects that was growing huge, but the client was more interested in seeing the functional requirements met over the non-functional ones (probably because they don&#8217;t see progress in it).  The project manager could&#8217;ve convinced the client that the project needed unit tests, but that&#8217;s another topic.</p>
<p>So now I&#8217;m facing a project that&#8217;s growing beyond what I expected, primarily because I wanted to add features only as the need arises. And as the project grows, I&#8217;m encountering circumstances where I already need to refactor a lot, which risks breaking the code. I can test the whole project everytime I refactor the source but I&#8217;m too lazy to test everything over and over so I decided to add unit tests to the project.</p>
<p>In search for a unit testing framework that&#8217;s applicable for the project, I found out about <a title="GAEUnit" href="http://code.google.com/p/gaeunit/" target="_blank">GAEUnit</a>.</p>
<blockquote><p>GAEUnit is a unit test framework that helps to automate testing of your Google App Engine application. With a single configuration change (it can be completed within 30 seconds), your unit tests can be run in the real GAE app server environment using a web browser.</p></blockquote>
<p>I was able to setup GAEUnit after getting over a bit of misconfiguration (the handler for gaeunit.py was supposed to be placed on top of the other handlers in app.yaml and I don&#8217;t know why) and used the modified &#8216;webtest&#8217; module that came with the zipped archive.</p>
<p>So I was set to write my unit tests. Then I realized that I didn&#8217;t know which parts of my code needed urgent unit testing except for one, which is to check whether the mailer is working without actually sending an email. Which pieces of my code needed unit tests? I also didn&#8217;t want to write too many unit tests. I started to wonder how much unit tests other developers are including in their projects. How do I write tests for functions that needed parameters that are valid and should come from the database? Should I query for valid values within unit tests? Should I write unit tests for those queries that are only used for the unit tests? Should I write unit tests for my unit tests? Or perhaps I can write a program that automatically writes the unit tests that I need?</p>
<p>I found several good points from an article by Tim Burns, <a title="Effective Unit Testing" href="http://ubiquity.acm.org/article.cfm?id=358976" target="_blank">Effective Unit Testing</a>, which answers most of my questions:</p>
<ul>
<li>The crucial issue in constructing a unit test is scope. If the scope is too narrow, then the tests will be trivial and the objects might pass the tests, but there will be no design of their interactions.</li>
<li>If the scope is too broad, then there is a high chance that not every component of the new code will get tested. The programmer is then reduced to testing-by-poking-around, which is not an effective test strategy.</li>
<li>Start with a feature that is described in the requirements document and work down until a method doesn&#8217;t need a unit test. That way, tests are grouped according to major feature and should include as many unit tests that deal with the feature in question as are necessary.</li>
<li>If the code is simple enough that the developer can just look at it and verify its correctness then it is simple enough to not require a unit test. The developer should know when this is the case.</li>
<li>If error handling is performed in a method, then that method can break. Generally, any method that can break is a good candidate for having a unit test, because it may break at some time, and then the unit test will be there to help you fix it.</li>
<li>The programmer should know that their unit testing is complete when the unit tests cover at the very least the functional requirements of all the code. The careful programmer will know that their unit testing is complete when they have verified that their unit tests cover every cluster of objects that form their application.</li>
</ul>
<p>I&#8217;m still looking for good articles on unit testing. Feel free to post your tips and resources.</p>
<p>Related posts:<ol>
<li><a href='http://blog.randell.ph/2010/04/05/using-gae-testbed-with-gaeunit-testing-that-email-was-sent/' rel='bookmark' title='Using GAE Testbed with GAEUnit: Testing that email was sent'>Using GAE Testbed with GAEUnit: Testing that email was sent</a></li>
<li><a href='http://blog.randell.ph/2009/11/13/postgresql-notes/' rel='bookmark' title='PostgreSQL notes'>PostgreSQL notes</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.randell.ph/2010/04/01/thoughts-and-notes-on-unit-testing/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Install IDLE on Fedora 11</title>
		<link>http://blog.randell.ph/2009/09/17/install-idle-on-fedora-11/</link>
		<comments>http://blog.randell.ph/2009/09/17/install-idle-on-fedora-11/#comments</comments>
		<pubDate>Thu, 17 Sep 2009 15:02:50 +0000</pubDate>
		<dc:creator>Randell</dc:creator>
				<category><![CDATA[Fedora]]></category>
		<category><![CDATA[How-to]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[editor]]></category>
		<category><![CDATA[IDLE]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://randell.ph/geeky/?p=819</guid>
		<description><![CDATA[IDLE is the Python IDE built with the tkinter GUI toolkit. IDLE has the following features: coded in 100% pure Python, using the tkinter GUI toolkit cross-platform: works on Windows and Unix multi-window text editor with multiple undo, Python colorizing and many other features, e.g. smart indent and call tips Python shell window (a.k.a. interactive [...]
Related posts:<ol>
<li><a href='http://blog.randell.ph/2010/04/04/setuptools/' rel='bookmark' title='Install setuptools in Fedora 12'>Install setuptools in Fedora 12</a></li>
<li><a href='http://blog.randell.ph/2009/09/01/install-handbrake-on-fedora-11/' rel='bookmark' title='Install Handbrake on Fedora 11'>Install Handbrake on Fedora 11</a></li>
<li><a href='http://blog.randell.ph/2009/07/26/install-sqlite-database-browser-on-fedora/' rel='bookmark' title='Install SQLite Database Browser on Fedora'>Install SQLite Database Browser on Fedora</a></li>
<li><a href='http://blog.randell.ph/2009/03/27/install-windows-xp-sp2-via-sun-virtualbox-in-fedora-10/' rel='bookmark' title='Install Windows XP SP2 via Sun VirtualBox in Fedora 10'>Install Windows XP SP2 via Sun VirtualBox in Fedora 10</a></li>
<li><a href='http://blog.randell.ph/2009/09/16/install-chromium-on-fedora-11/' rel='bookmark' title='Install Chromium on Fedora 11'>Install Chromium on Fedora 11</a></li>
</ol>]]></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%2Fblog.randell.ph%2F2009%2F09%2F17%2Finstall-idle-on-fedora-11%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.randell.ph%2F2009%2F09%2F17%2Finstall-idle-on-fedora-11%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<blockquote>
<p id="index-371">IDLE is the Python IDE built with the <tt><span>tkinter</span></tt> GUI toolkit.</p>
<p>IDLE has the following features:</p>
<ul>
<li>coded in 100% pure Python, using the <tt><span>tkinter</span></tt> GUI toolkit</li>
<li>cross-platform: works on Windows and Unix</li>
<li>multi-window text editor with multiple undo, Python colorizing and many other features, e.g. smart indent and call tips</li>
<li>Python shell window (a.k.a. interactive interpreter)</li>
<li>debugger (not complete, but you can set breakpoints, view  and step)</li>
</ul>
</blockquote>
<p><span id="more-819"></span><br />
To install IDLE on Fedora, simply type the following in your terminal as root:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">yum <span style="color: #c20cb9; font-weight: bold;">install</span> python-tools</pre></div></div>

<p><code>python-tools</code> is the Python package that includes several development tools that are used to build python programs.</p>
<p>After installation, you can now run IDLE from your terminal by entering <code>idle</code>, which should launch a window similar to this:</p>
<div id="attachment_824" class="wp-caption aligncenter" style="width: 510px"><img class="size-full wp-image-824" title="Screenshot IDLE" src="http://randell.ph/geeky/wp-content/uploads/2009/09/Screenshot-Python-Shell.png" alt="Screenshot IDLE" width="500" height="299" /><p class="wp-caption-text">Screenshot IDLE</p></div>
<p>Related posts:<ol>
<li><a href='http://blog.randell.ph/2010/04/04/setuptools/' rel='bookmark' title='Install setuptools in Fedora 12'>Install setuptools in Fedora 12</a></li>
<li><a href='http://blog.randell.ph/2009/09/01/install-handbrake-on-fedora-11/' rel='bookmark' title='Install Handbrake on Fedora 11'>Install Handbrake on Fedora 11</a></li>
<li><a href='http://blog.randell.ph/2009/07/26/install-sqlite-database-browser-on-fedora/' rel='bookmark' title='Install SQLite Database Browser on Fedora'>Install SQLite Database Browser on Fedora</a></li>
<li><a href='http://blog.randell.ph/2009/03/27/install-windows-xp-sp2-via-sun-virtualbox-in-fedora-10/' rel='bookmark' title='Install Windows XP SP2 via Sun VirtualBox in Fedora 10'>Install Windows XP SP2 via Sun VirtualBox in Fedora 10</a></li>
<li><a href='http://blog.randell.ph/2009/09/16/install-chromium-on-fedora-11/' rel='bookmark' title='Install Chromium on Fedora 11'>Install Chromium on Fedora 11</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.randell.ph/2009/09/17/install-idle-on-fedora-11/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>web2py Enterprise Web Framework</title>
		<link>http://blog.randell.ph/2009/05/20/web2py-enterprise-web-framework/</link>
		<comments>http://blog.randell.ph/2009/05/20/web2py-enterprise-web-framework/#comments</comments>
		<pubDate>Wed, 20 May 2009 01:44:24 +0000</pubDate>
		<dc:creator>Randell</dc:creator>
				<category><![CDATA[Fedora]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[MVC]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[web2py]]></category>

		<guid isPermaLink="false">http://randell.ph/geeky/?p=565</guid>
		<description><![CDATA[web2py Enterprise Web Framework is a Free and open source full-stack enterprise framework for agile development of fast, secure and portable database-driven web-based applications. Written and programmable in Python. web2py follows a Model View Controller design like Rails (Ruby) and CodeIgniter (PHP).  Another good thing about web2py is that it can run on the Google [...]
Related posts:<ol>
<li><a href='http://blog.randell.ph/2009/09/17/install-idle-on-fedora-11/' rel='bookmark' title='Install IDLE on Fedora 11'>Install IDLE on Fedora 11</a></li>
<li><a href='http://blog.randell.ph/2009/07/26/install-sqlite-database-browser-on-fedora/' rel='bookmark' title='Install SQLite Database Browser on Fedora'>Install SQLite Database Browser on Fedora</a></li>
<li><a href='http://blog.randell.ph/2009/10/21/fix-sound-problems-in-fedora-11/' rel='bookmark' title='Fix Sound Problems in Fedora 11'>Fix Sound Problems in Fedora 11</a></li>
<li><a href='http://blog.randell.ph/2009/03/27/install-windows-xp-sp2-via-sun-virtualbox-in-fedora-10/' rel='bookmark' title='Install Windows XP SP2 via Sun VirtualBox in Fedora 10'>Install Windows XP SP2 via Sun VirtualBox in Fedora 10</a></li>
<li><a href='http://blog.randell.ph/2011/08/01/how-to-create-custom-application-launchers-in-gnome-3/' rel='bookmark' title='How to create custom application launchers in Gnome 3'>How to create custom application launchers in Gnome 3</a></li>
</ol>]]></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%2Fblog.randell.ph%2F2009%2F05%2F20%2Fweb2py-enterprise-web-framework%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.randell.ph%2F2009%2F05%2F20%2Fweb2py-enterprise-web-framework%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p><a title="web2py Enterprise Web Framework" href="http://web2py.com/" target="_blank">web2py Enterprise Web Framework</a> is a</p>
<blockquote><p>Free and open source full-stack enterprise framework for agile development of fast, secure and portable database-driven web-based applications. Written and programmable in Python.</p></blockquote>
<p>web2py follows a Model View Controller design like Rails (Ruby) and CodeIgniter (PHP).  Another good thing about web2py is that it can run on the Google App Engine, which I&#8217;ve been wanting to use.<br />
<span id="more-1047"></span><br />
web2py doesn&#8217;t need to be installed.  Just download web2py <a title="Download web2py" href="http://http://www.web2py.com/examples/default/download" target="_blank">download page</a>.  Click the one that says <strong>source code</strong> for all platforms.  Unzip the file.  Change your location to the extracted folder.  Then type this in your terminal:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">python2.5 web2py.py</pre></div></div>

<p>You should see the web2py server dialog (<em>see screenshot</em> below).</p>
<div id="attachment_570" class="wp-caption aligncenter" style="width: 314px"><img class="size-full wp-image-570" title="Screenshot web2py server" src="http://randell.ph/geeky/wp-content/uploads/2009/05/screenshot-web2py-server.png" alt="Screenshot web2py server" width="304" height="226" /><p class="wp-caption-text">Screenshot web2py server</p></div>
<p>You may then enter a one-time administrator password.  Clicking the start server button should open your default browser set to the administrator interface (<em>see screenshot below</em>).</p>
<div id="attachment_572" class="wp-caption aligncenter" style="width: 571px"><img class="size-full wp-image-572" title="Screenshot web2py welcome" src="http://randell.ph/geeky/wp-content/uploads/2009/05/screenshot-web2py-welcome.png" alt="Screenshot web2py welcome" width="561" height="348" /><p class="wp-caption-text">Screenshot web2py welcome</p></div>
<p>web2py also already contains the Python interpreter, web-server and database, but you may customize it to use a different web-server or database.</p>
<p>More:</p>
<p><a title="What is web2py" href="http://www.web2py.com/examples/default/what" target="_blank">What is web2py?</a></p>
<p><a title="Try web2py online!" href="http://mdp.cti.depaul.edu/demo_admin" target="_blank">Try it online!</a></p>
<p>Related posts:<ol>
<li><a href='http://blog.randell.ph/2009/09/17/install-idle-on-fedora-11/' rel='bookmark' title='Install IDLE on Fedora 11'>Install IDLE on Fedora 11</a></li>
<li><a href='http://blog.randell.ph/2009/07/26/install-sqlite-database-browser-on-fedora/' rel='bookmark' title='Install SQLite Database Browser on Fedora'>Install SQLite Database Browser on Fedora</a></li>
<li><a href='http://blog.randell.ph/2009/10/21/fix-sound-problems-in-fedora-11/' rel='bookmark' title='Fix Sound Problems in Fedora 11'>Fix Sound Problems in Fedora 11</a></li>
<li><a href='http://blog.randell.ph/2009/03/27/install-windows-xp-sp2-via-sun-virtualbox-in-fedora-10/' rel='bookmark' title='Install Windows XP SP2 via Sun VirtualBox in Fedora 10'>Install Windows XP SP2 via Sun VirtualBox in Fedora 10</a></li>
<li><a href='http://blog.randell.ph/2011/08/01/how-to-create-custom-application-launchers-in-gnome-3/' rel='bookmark' title='How to create custom application launchers in Gnome 3'>How to create custom application launchers in Gnome 3</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.randell.ph/2009/05/20/web2py-enterprise-web-framework/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

