<?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>The.Failboat.me &#187; Python</title>
	<atom:link href="http://failboat.me/category/personal/python/feed/" rel="self" type="application/rss+xml" />
	<link>http://failboat.me</link>
	<description>Everything about Nothing</description>
	<lastBuildDate>Wed, 28 Jul 2010 04:12:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Pydev: The Best Python IDE</title>
		<link>http://failboat.me/2010/pydev-the-best-python-ide/</link>
		<comments>http://failboat.me/2010/pydev-the-best-python-ide/#comments</comments>
		<pubDate>Thu, 22 Jul 2010 03:09:15 +0000</pubDate>
		<dc:creator>Lee</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[editor]]></category>
		<category><![CDATA[ide]]></category>
		<category><![CDATA[pydev]]></category>

		<guid isPermaLink="false">http://failboat.me/?p=2157</guid>
		<description><![CDATA[<p>While I don&#8217;t usually advertise, I love eclipse for all of its feature rich implementations of language specific IDE&#8217;s. Among those is Pydev, a complete first class IDE for Python.<br />
Recently, Pydev just hit version 1.6.0 (Congratulations!) with the&#8230;</p>]]></description>
		<wfw:commentRss>http://failboat.me/2010/pydev-the-best-python-ide/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Python: Self references in List comprehension</title>
		<link>http://failboat.me/2010/python-self-references-in-list-comprehension/</link>
		<comments>http://failboat.me/2010/python-self-references-in-list-comprehension/#comments</comments>
		<pubDate>Wed, 21 Jul 2010 03:09:23 +0000</pubDate>
		<dc:creator>Lee</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Snippets]]></category>
		<category><![CDATA[haskell]]></category>
		<category><![CDATA[lambda]]></category>
		<category><![CDATA[list comprehension]]></category>
		<category><![CDATA[self reference]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[ugly]]></category>

		<guid isPermaLink="false">http://failboat.me/?p=1959</guid>
		<description><![CDATA[<p>One of the great abilities in Python that is copied over from Haskell is the ability to construct lists from other lists or iterators inline. This is of course limiting in certain cases where self references are necessary. For example,&#8230;</p>]]></description>
		<wfw:commentRss>http://failboat.me/2010/python-self-references-in-list-comprehension/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Python Tip: Copying an object</title>
		<link>http://failboat.me/2010/python-tip-copying-an-object/</link>
		<comments>http://failboat.me/2010/python-tip-copying-an-object/#comments</comments>
		<pubDate>Mon, 19 Jul 2010 02:30:46 +0000</pubDate>
		<dc:creator>Lee</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Snippets]]></category>
		<category><![CDATA[attributes]]></category>
		<category><![CDATA[containers]]></category>
		<category><![CDATA[copies]]></category>
		<category><![CDATA[copy]]></category>
		<category><![CDATA[deep copy]]></category>
		<category><![CDATA[items]]></category>
		<category><![CDATA[list]]></category>
		<category><![CDATA[object]]></category>
		<category><![CDATA[reference]]></category>
		<category><![CDATA[shallow copy]]></category>

		<guid isPermaLink="false">http://failboat.me/?p=751</guid>
		<description><![CDATA[<p>One of the several &#8220;features&#8221; of python that often land beginners head over feet with their faces in the mud is the distinction between references and copies. Say we have the following list <strong>a</strong>:</p>
<pre class="brush: python">
a = [1,3,5,7,9,11]</pre><p>&#8230;</p>]]></description>
		<wfw:commentRss>http://failboat.me/2010/python-tip-copying-an-object/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Brain Teaser: Multiply by 6</title>
		<link>http://failboat.me/2010/brain-teaser-multiply-by-6/</link>
		<comments>http://failboat.me/2010/brain-teaser-multiply-by-6/#comments</comments>
		<pubDate>Sat, 17 Jul 2010 07:22:21 +0000</pubDate>
		<dc:creator>Lee</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Snippets]]></category>
		<category><![CDATA[bit shift]]></category>
		<category><![CDATA[brain teaser]]></category>
		<category><![CDATA[multiply]]></category>

		<guid isPermaLink="false">http://failboat.me/?p=739</guid>
		<description><![CDATA[<p><em>How do I go about multiplying a real number n by 6 in python without using the * or the + operators?</em></p>
<p><strong>Solution</strong>:</p>
<pre class="brush: python">
x6 = lambda n: (n&#60;&#60;3) - n - n
</pre>
<p>Rationale:</p>
<p>n]]></description>
		<wfw:commentRss>http://failboat.me/2010/brain-teaser-multiply-by-6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linked Lists via ctypes in Python</title>
		<link>http://failboat.me/2010/linked-lists-via-ctypes-in-python/</link>
		<comments>http://failboat.me/2010/linked-lists-via-ctypes-in-python/#comments</comments>
		<pubDate>Wed, 07 Apr 2010 04:00:22 +0000</pubDate>
		<dc:creator>Lee</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Snippets]]></category>
		<category><![CDATA[ctypes]]></category>
		<category><![CDATA[linked list]]></category>
		<category><![CDATA[pointers]]></category>
		<category><![CDATA[structure]]></category>

		<guid isPermaLink="false">http://failboat.me/?p=617</guid>
		<description><![CDATA[<pre class="brush: python">
from ctypes import *

class linknode(Structure):
    pass
linknode._fields_ = [
                (&#34;nextNode&#34;, POINTER(linknode)),
                (&#34;intData&#34;, c_int),
                ]
class linked_list():
    head_node = None
    def add(self, int_data):
        node_to_add = linknode(intData = c_int(int_data))
        if (self.head_node == None):
            self.head_node = node_to_add
        else:
            traverse_node</pre><p>&#8230;</p>]]></description>
		<wfw:commentRss>http://failboat.me/2010/linked-lists-via-ctypes-in-python/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Best Hello World App Ever :D</title>
		<link>http://failboat.me/2010/best-hello-world-app-ever-d/</link>
		<comments>http://failboat.me/2010/best-hello-world-app-ever-d/#comments</comments>
		<pubDate>Mon, 01 Feb 2010 22:07:06 +0000</pubDate>
		<dc:creator>Lee</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Snippets]]></category>
		<category><![CDATA[hello]]></category>
		<category><![CDATA[world]]></category>

		<guid isPermaLink="false">http://failboat.me/?p=555</guid>
		<description><![CDATA[<p>Written in Python <img src='http://failboat.me/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>See <a href="http://failboat.me/2009/cute-functions-creating-pseudo-operators-in-python/">http://failboat.me/2009/cute-functions-creating-pseudo-operators-in-python/</a> for more details.</p>
<pre class="brush: python">
#Hello World

class Operator(object):
    def __init__(self, func, count=2):
        self._func_ = func
        self._args_ = []
        self._count_ = count
    def __ror__(self, first_arg):
        self._args_.append(first_arg)
        return</pre><p>&#8230;</p>]]></description>
		<wfw:commentRss>http://failboat.me/2010/best-hello-world-app-ever-d/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Gettings the most out of your bits</title>
		<link>http://failboat.me/2009/gettings-the-most-out-of-your-bits/</link>
		<comments>http://failboat.me/2009/gettings-the-most-out-of-your-bits/#comments</comments>
		<pubDate>Sun, 01 Nov 2009 14:51:21 +0000</pubDate>
		<dc:creator>Lee</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Snippets]]></category>

		<guid isPermaLink="false">http://failboat.me/?p=506</guid>
		<description><![CDATA[<p>The following will produce the bit representation of an ord(byte) in python</p>
<pre class="brush: python">
def bit(chr, i=0, str=&#039;&#039;):
    if i &#62; 7: return str
    coef = (2**(8-i-1))
    if chr &#62;= coef: return bit(chr-coef, i+1, str+&#039;1&#039;)
    return bit(chr, i+1, str+&#039;0&#039;)</pre><p>&#8230;</p>]]></description>
		<wfw:commentRss>http://failboat.me/2009/gettings-the-most-out-of-your-bits/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Primitive Collision Detection – Circular objects</title>
		<link>http://failboat.me/2009/primitive-collision-detection-circular-objects/</link>
		<comments>http://failboat.me/2009/primitive-collision-detection-circular-objects/#comments</comments>
		<pubDate>Sun, 01 Nov 2009 03:52:28 +0000</pubDate>
		<dc:creator>Lee</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Snippets]]></category>

		<guid isPermaLink="false">http://failboat.me/?p=502</guid>
		<description><![CDATA[<p>Consider the following &#8211; </p>
<p>If you are designing a game, and have the players shaped as circles, how would you detect bullet collisions with the players?</p>
<p>Well, the problem with bullet collision detection is that you can&#8217;t just use&#8230;</p>]]></description>
		<wfw:commentRss>http://failboat.me/2009/primitive-collision-detection-circular-objects/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[Python] Get Function Args</title>
		<link>http://failboat.me/2009/python-get-function-args/</link>
		<comments>http://failboat.me/2009/python-get-function-args/#comments</comments>
		<pubDate>Wed, 28 Oct 2009 06:02:47 +0000</pubDate>
		<dc:creator>Lee</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Snippets]]></category>

		<guid isPermaLink="false">http://failboat.me/?p=487</guid>
		<description><![CDATA[<pre class="brush: python">
getargs = lambda func: (func.func_code.co_varnames[:func.func_code.co_argcount])
</pre>
<p>Example Session</p>
<pre class="brush: python">

#Example Session

getargs = lambda func: (func.func_code.co_varnames[:func.func_code.co_argcount])
def addition(x,y):
    return x+y
print getargs(addition)
#(&#039;x&#039;, &#039;y&#039;)
</pre>
<p>Yep, it&#8217;s really that simple. No weird exec functions needed, no intrusive introspection via the disassembler.</p>
]]></description>
		<wfw:commentRss>http://failboat.me/2009/python-get-function-args/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cute Functions – Creating pseudo-operators in Python</title>
		<link>http://failboat.me/2009/cute-functions-creating-pseudo-operators-in-python/</link>
		<comments>http://failboat.me/2009/cute-functions-creating-pseudo-operators-in-python/#comments</comments>
		<pubDate>Tue, 27 Oct 2009 02:05:55 +0000</pubDate>
		<dc:creator>Lee</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Snippets]]></category>
		<category><![CDATA[cute]]></category>
		<category><![CDATA[functions]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[operators]]></category>
		<category><![CDATA[pseudo]]></category>
		<category><![CDATA[quirky]]></category>

		<guid isPermaLink="false">http://failboat.me/?p=474</guid>
		<description><![CDATA[<p>I ran across something today that I found to be extremely interesting. Basically, the authors of Should_DSL, <a href="http://pypi.python.org/pypi/should_dsl/1.2.1">http://pypi.python.org/pypi/should_dsl/1.2.1</a>, have attempted and succeeded in creating pseudo-operators based on operator-functions within an object.</p>
<p>Let me elaborate.</p>
<blockquote><p>The goal of Should-DSL is</p></blockquote><p>&#8230;</p>]]></description>
		<wfw:commentRss>http://failboat.me/2009/cute-functions-creating-pseudo-operators-in-python/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Python &#8211; Abstract Function class</title>
		<link>http://failboat.me/2009/python-abstract-function-class/</link>
		<comments>http://failboat.me/2009/python-abstract-function-class/#comments</comments>
		<pubDate>Sun, 02 Aug 2009 21:12:01 +0000</pubDate>
		<dc:creator>Lee</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Snippets]]></category>
		<category><![CDATA[abstract]]></category>
		<category><![CDATA[abstract class]]></category>
		<category><![CDATA[abstract function]]></category>
		<category><![CDATA[class]]></category>
		<category><![CDATA[datatype]]></category>
		<category><![CDATA[equal]]></category>
		<category><![CDATA[function]]></category>
		<category><![CDATA[overload]]></category>
		<category><![CDATA[py]]></category>
		<category><![CDATA[__call__]]></category>
		<category><![CDATA[__eq__]]></category>

		<guid isPermaLink="false">http://6.dot.ch/?p=316</guid>
		<description><![CDATA[<p>Python is great. It&#8217;s dynamic, it&#8217;s flexible, and best of all, for almost all major datatypes, there&#8217;s an associated abstract class from which you can over-ride and build your own object out of.</p>
<p>Of course, Python doesn&#8217;t treat functions in&#8230;</p>]]></description>
		<wfw:commentRss>http://failboat.me/2009/python-abstract-function-class/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Chroma-Hash implementation in Python</title>
		<link>http://failboat.me/2009/chroma-hash-implementation-in-python/</link>
		<comments>http://failboat.me/2009/chroma-hash-implementation-in-python/#comments</comments>
		<pubDate>Thu, 30 Jul 2009 16:28:40 +0000</pubDate>
		<dc:creator>Lee</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Snippets]]></category>
		<category><![CDATA[algorithm]]></category>
		<category><![CDATA[Chroma]]></category>
		<category><![CDATA[cool]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[encryption]]></category>
		<category><![CDATA[Hash]]></category>
		<category><![CDATA[MD5]]></category>
		<category><![CDATA[neat]]></category>
		<category><![CDATA[password]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[visualization]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://6.dot.ch/?p=311</guid>
		<description><![CDATA[<p>I&#8217;ve just read an experiment by mattt.me about creating a multi-colored area beside the password area in order to let people who have extremely long passwords know that their passwords matches.</p>
<p><a href="http://mattt.me/2009/07/chroma-hash-a-belated-introduction/">http://mattt.me/2009/07/chroma-hash-a-belated-introduction/</a></p>
<p>Personally I thought that this is an extremely&#8230;</p>]]></description>
		<wfw:commentRss>http://failboat.me/2009/chroma-hash-implementation-in-python/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Auto-restart in (Python) and subprocess.Popen goodness</title>
		<link>http://failboat.me/2009/auto-restart-in-python-and-subprocess-popen-goodness/</link>
		<comments>http://failboat.me/2009/auto-restart-in-python-and-subprocess-popen-goodness/#comments</comments>
		<pubDate>Sun, 12 Jul 2009 01:00:01 +0000</pubDate>
		<dc:creator>Lee</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Snippets]]></category>
		<category><![CDATA[auto]]></category>
		<category><![CDATA[autostart]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[goodness]]></category>
		<category><![CDATA[grep]]></category>
		<category><![CDATA[kill]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[omg]]></category>
		<category><![CDATA[orbited]]></category>
		<category><![CDATA[pipes]]></category>
		<category><![CDATA[Popen]]></category>
		<category><![CDATA[process]]></category>
		<category><![CDATA[ps]]></category>
		<category><![CDATA[Python 2.5]]></category>
		<category><![CDATA[Python 3.0]]></category>
		<category><![CDATA[restart]]></category>
		<category><![CDATA[subprocess]]></category>
		<category><![CDATA[task manager]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://6.dot.ch/?p=285</guid>
		<description><![CDATA[<p>This is an auto-restart script for Orbited, but it can be modified to be used with other apps. This is presuming that there&#8217;s only one instance with that name running.</p>
<p>Basically, this script takes into account the fact that if&#8230;</p>]]></description>
		<wfw:commentRss>http://failboat.me/2009/auto-restart-in-python-and-subprocess-popen-goodness/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How-To: Use Zlib and Ez_Setup.py in Python 2.5</title>
		<link>http://failboat.me/2009/how-to-use-zlib-in-python-2-5/</link>
		<comments>http://failboat.me/2009/how-to-use-zlib-in-python-2-5/#comments</comments>
		<pubDate>Sat, 11 Jul 2009 06:40:26 +0000</pubDate>
		<dc:creator>Lee</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Snippets]]></category>

		<guid isPermaLink="false">http://6.dot.ch/?p=278</guid>
		<description><![CDATA[<p>As many have noticed while install easy_install on Python 2.5, a mysterious message appears that a previously very prevalent package has disappeared from python.</p>
<pre class="brush: python">
[root@server]# python

Python 2.5.4 (r254:67916, Jul 11 2009, 12:13:45)
[GCC 4.1.2 20080704 (Red</pre><p>&#8230;</p>]]></description>
		<wfw:commentRss>http://failboat.me/2009/how-to-use-zlib-in-python-2-5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Import Antigravity (Oh snap, we&#8217;re flying)</title>
		<link>http://failboat.me/2009/import-antigravity-oh-snap-were-flying/</link>
		<comments>http://failboat.me/2009/import-antigravity-oh-snap-were-flying/#comments</comments>
		<pubDate>Wed, 03 Jun 2009 00:43:23 +0000</pubDate>
		<dc:creator>Lee</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Snippets]]></category>
		<category><![CDATA[3.0]]></category>
		<category><![CDATA[antigravity]]></category>
		<category><![CDATA[import]]></category>
		<category><![CDATA[Python 3.0]]></category>
		<category><![CDATA[XKCD]]></category>

		<guid isPermaLink="false">http://6.dot.ch/?p=206</guid>
		<description><![CDATA[<p>I&#8217;ve just installed Python 3.0 and while in my geeky pursuit for perfection by sifting through the new files, I came across <strong>antigravity.py</strong> within the python directory. </p>
<pre class="brush: python">
import webbrowser
webbrowser.open(&#34;http://xkcd.com/353/&#34;)
</pre>
<p>So now, if you type&#8230;</p>]]></description>
		<wfw:commentRss>http://failboat.me/2009/import-antigravity-oh-snap-were-flying/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
