<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>2008 on John Paulett</title><link>https://www.johnpaulett.com/posts/2008/</link><description>Recent content in 2008 on John Paulett</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Sun, 21 Sep 2008 02:13:33 +0000</lastBuildDate><atom:link href="https://www.johnpaulett.com/posts/2008/index.xml" rel="self" type="application/rss+xml"/><item><title>Getting RESTful with web.py</title><link>https://www.johnpaulett.com/2008/getting-restful-with-webpy/</link><pubDate>Sun, 21 Sep 2008 02:13:33 +0000</pubDate><guid>https://www.johnpaulett.com/2008/getting-restful-with-webpy/</guid><description>&lt;p>&lt;a href="http://www.djangoproject.com/">Django&lt;/a> may be the Python web framework
getting all the press
&lt;a href="http://www.djangoproject.com/weblog/2008/sep/03/1/">recently&lt;/a>, but
&lt;a href="http://webpy.org/">web.py&lt;/a> is definitely a nice, simple framework. One
of the nice aspects of web.py is that it exposes methods for the basic
&lt;a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html">HTTP methods&lt;/a>
(GET, POST, PUT, DELETE, etc.) and uses these methods to process each
request from the client. This approach makes it amazingly easy to write
a RESTful API.&lt;/p>
&lt;h1 id="webpy">web.py&lt;/h1>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-python" data-lang="python">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">import&lt;/span> web
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">class&lt;/span> &lt;span style="color:#a6e22e">Resource&lt;/span>(object):
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">def&lt;/span> &lt;span style="color:#a6e22e">GET&lt;/span>(self, name):
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#75715e"># return the resource&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">def&lt;/span> &lt;span style="color:#a6e22e">POST&lt;/span>(self, name):
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#75715e"># update/create the resource&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>This approach is very similar to what &lt;a href="http://code.google.com/appengine/">Google App
Engine&lt;/a> does with its
&lt;a href="http://code.google.com/appengine/docs/webapp/">webapp&lt;/a>.&lt;/p></description></item><item><title>New jsonpickle release</title><link>https://www.johnpaulett.com/2008/new-jsonpickle-release/</link><pubDate>Tue, 22 Jul 2008 03:42:12 +0000</pubDate><guid>https://www.johnpaulett.com/2008/new-jsonpickle-release/</guid><description>&lt;p>Just released 0.0.5 for
&lt;a href="http://code.google.com/p/jsonpickle/">jsonpickle&lt;/a>, the Python to JSON
object serializer. Check out the
&lt;a href="http://blog.7oars.com/2008/07/jsonpickle-005-released.html">announcement&lt;/a>.&lt;/p></description></item><item><title>Eclipse 3.4 (Ganymede) on Ubuntu</title><link>https://www.johnpaulett.com/2008/eclipse-34-ganymede-on-ubuntu/</link><pubDate>Fri, 27 Jun 2008 00:14:32 +0000</pubDate><guid>https://www.johnpaulett.com/2008/eclipse-34-ganymede-on-ubuntu/</guid><description>&lt;p>::: notice
These instructions refer to outdated version of Eclipse and Ubuntu.
Please refer to the new instructions on installing &lt;a href="http://johnpaulett.com/2009/06/26/install-eclipse-galileo-3-5-on-ubuntu-jaunty-9-04/">Eclipse Galileo
(3.5) on Ubuntu Jaunty
(9.04)&lt;/a>
:::&lt;/p>
&lt;p>&lt;a href="http://www.eclipse.org">Eclipse Ganymede&lt;/a> (the successor to Europa) was
released today. Ubuntu seems to be stuck on Eclipse 3.2 since at least
Feisty Fawn. There are nice features that we are missing out on (Mylyn,
inline renames, etc.). &lt;strong>JDK&lt;/strong> First things first, you need a JDK (Java
SDK) in order to use Eclipse. I am a fan of the OpenJDK, Sun's open
source version of its JDK. OpenJDK recently reached full Sun JDK
compliance. But any JDK should work, assuming it is at least Java 5.&lt;/p></description></item><item><title>pymedia on Ubuntu Hardy Heron</title><link>https://www.johnpaulett.com/2008/pymedia-on-ubuntu-hardy-heron/</link><pubDate>Thu, 19 Jun 2008 02:34:21 +0000</pubDate><guid>https://www.johnpaulett.com/2008/pymedia-on-ubuntu-hardy-heron/</guid><description>&lt;p>Recently, I needed to use &lt;a href="http://pymedia.org/">pymedia&lt;/a>, for some audio
and video encoding. The problem though, is that pymedia was nowhere to
be found in the Ubuntu Hardy Heron package repository, and the only .deb
installation candidate from the pymedia website was for an older version
of pymedia and Python 2.4. Not wanting to run an old version and having
Python 2.5 as a requirement, I needed to compile the package myself--no
easy task, it turns out.&lt;/p></description></item><item><title>bminews.com launched</title><link>https://www.johnpaulett.com/2008/bminewscom-launched/</link><pubDate>Mon, 09 Jun 2008 04:30:53 +0000</pubDate><guid>https://www.johnpaulett.com/2008/bminewscom-launched/</guid><description>&lt;p>I am launching a social news site, &lt;a href="http://bminews.com">bminews.com&lt;/a>. It
is a specialty site for practitioners in the fields of Bioinformatics
and Medical Informatics. Join in! I am looking for a site with great
news on new developments, technologies, and opportunities in the field.
Related topics (programming/consulting/career advice/math/scientific
writing/conferences) are all encouraged.&lt;/p></description></item><item><title>jsonpickle</title><link>https://www.johnpaulett.com/2008/jsonpickle/</link><pubDate>Sat, 07 Jun 2008 10:06:56 +0000</pubDate><guid>https://www.johnpaulett.com/2008/jsonpickle/</guid><description>&lt;p>I have been working on an open source project,
&lt;a href="http://code.google.com/p/jsonpickle/">jsonpickle&lt;/a>. The goal of the
project is to be able to serialize a Python object into standard
&lt;a href="http://www.json.org">JSON&lt;/a> notation. Python can &amp;quot;pickle&amp;quot; objects into
a special binary format, but sometimes it is nice to get a
human-readable format. Especially with projects like
&lt;a href="http://incubator.apache.org/couchdb/">CouchDB&lt;/a> that have use a
JSON-based API. jsonpickle is on its seconds release and can now
officially handle Mark Pilgrim's &lt;a href="http://www.feedparser.org">Universal Feed
Parser&lt;/a>. Feel free to join in by finding bugs
and working on the code! It is pretty easy to use:&lt;/p></description></item><item><title>Building Python Packages from Source on Windows</title><link>https://www.johnpaulett.com/2008/building-python-packages-from-source-on-windows/</link><pubDate>Mon, 04 Feb 2008 04:28:21 +0000</pubDate><guid>https://www.johnpaulett.com/2008/building-python-packages-from-source-on-windows/</guid><description>&lt;p>I always forget how to build Python packages, such as
&lt;a href="http://psyco.sourceforge.net/">psyco&lt;/a> and
&lt;a href="http://pypi.python.org/pypi/simplejson">simplejson&lt;/a> that require C/C++
code to be compiled. The usual error I get from running &amp;quot;python
setup.py install&amp;quot; is&lt;/p>
&lt;pre>&lt;code>error: Python was built with Visual Studio 2003; extensions must be
built with a compiler than can generate compatible binaries. Visual
Studio 2003 was not found on this system. If you have Cygwin
installed, you can try compiling with MingW32, by passing &amp;quot;-c
mingw32&amp;quot; to setup.py.
&lt;/code>&lt;/pre>
&lt;p>Now, I do not have Visual Studio 2003, but I do have mingw32. (Grab
&lt;a href="http://www.cygwin.com/">cygwin&lt;/a> and when selecting packages, make sure
than mingw-runtime and gcc are selected.) Now, back with our setup.py
file, execute:&lt;/p></description></item><item><title>CPAN on Windows</title><link>https://www.johnpaulett.com/2008/cpan-on-windows/</link><pubDate>Sun, 03 Feb 2008 01:56:28 +0000</pubDate><guid>https://www.johnpaulett.com/2008/cpan-on-windows/</guid><description>&lt;p>To use Perl's &lt;a href="http://www.cpan.org">CPAN&lt;/a>on Windows with
&lt;a href="http://www.cygwin.com/">cygwin&lt;/a>, you need to install some additional
programs in cygwin. Run cygwin's setup.exe (I like clicking the
&amp;quot;View&amp;quot; button to change the listing to Full, so I get an alphabetical
list of the packages). Make sure that you install the following
packages:&lt;/p>
&lt;ul>
&lt;li>perl (just in case you do not have it)&lt;/li>
&lt;li>gzip&lt;/li>
&lt;li>tar&lt;/li>
&lt;li>unzip&lt;/li>
&lt;li>make&lt;/li>
&lt;li>lynx&lt;/li>
&lt;li>wget&lt;/li>
&lt;li>ncftp&lt;/li>
&lt;li>gnupg&lt;/li>
&lt;/ul>
&lt;p>Open the Cygwin bash shell and enter:&lt;/p></description></item></channel></rss>