<?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>SuperBoB &#187; python</title>
	<atom:link href="http://www.superbob.com/category/python/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.superbob.com</link>
	<description>the pundit.</description>
	<lastBuildDate>Sat, 01 May 2010 16:31:04 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Wxpython and XRC</title>
		<link>http://www.superbob.com/2010/04/21/wxpython-and-xrc/</link>
		<comments>http://www.superbob.com/2010/04/21/wxpython-and-xrc/#comments</comments>
		<pubDate>Wed, 21 Apr 2010 18:42:24 +0000</pubDate>
		<dc:creator>bob</dc:creator>
				<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://www.superbob.com/?p=84</guid>
		<description><![CDATA[I dug up some old code and have been converting a wxPython program to use XRC resources.  I like the separation, between the layout and the code, but there are a bunch of things I don&#8217;t like.  The error messages are often cryptic.  For instance, &#8220;&#8216;Nonetype&#8217; object has no attribute &#8216;FindWindowById&#8217;&#8221; could [...]]]></description>
			<content:encoded><![CDATA[<p>I dug up some old code and have been converting a wxPython program to use XRC resources.  I like the separation, between the layout and the code, but there are a bunch of things I don&#8217;t like.  The error messages are often cryptic.  For instance, &#8220;&#8216;Nonetype&#8217; object has no attribute &#8216;FindWindowById&#8217;&#8221; could mean that you are missing an </object> or <object class=xxx> tag in your XRC file.  However, the error doesn&#8217;t say you are missing an object tag; it goes off about some sort of non-existent attribute.  No handler found for XML node &#8216;object&#8217;, class &#8216;xxx&#8217;!&#8221; probably means you missed putting a sizer object around a child in one of the different sizer container controls.  I suppose this is where an IDE would be useful to do refcounting of object/object and to determine if children inside a sizer control are suitably wrapped.  I generally prefer to write everything using Vim.  I&#8217;m not sure I&#8217;m smart enough to write a vim mode that could handle XRC files, but I can see where one would be pretty useful. Another &#8220;issue&#8221; I have is that most of the examples of using wxPython are not using XRC.  I sometimes have trouble adapting code I find online to fit in to my model.   In the end, though, I&#8217;ve been pretty happy with my experiments. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.superbob.com/2010/04/21/wxpython-and-xrc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>VIM as an IDE</title>
		<link>http://www.superbob.com/2010/01/02/vim-as-an-ide/</link>
		<comments>http://www.superbob.com/2010/01/02/vim-as-an-ide/#comments</comments>
		<pubDate>Sat, 02 Jan 2010 18:34:47 +0000</pubDate>
		<dc:creator>bob</dc:creator>
				<category><![CDATA[VIM]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://www.superbob.com/?p=66</guid>
		<description><![CDATA[VIM can be incredibly efficient as a text editor.  Even if this wasn&#8217;t the case, movement keystrokes are so ingrained in my muscle memory that I end getting j&#8217;s and k&#8217;s in my notepad and MSWord documents.  So the editing is taken care of, but the compiling, deploying, keyword/function lookup, etc. could be [...]]]></description>
			<content:encoded><![CDATA[<p>VIM can be incredibly efficient as a text editor.  Even if this wasn&#8217;t the case, movement keystrokes are so ingrained in my muscle memory that I end getting j&#8217;s and k&#8217;s in my notepad and MSWord documents.  So the editing is taken care of, but the compiling, deploying, keyword/function lookup, etc. could be better.  I realize there are many &#8220;tricks&#8221; and vim plugins to give a lot of this functionality, but it seems like I have to search again whenever I set up a vim environment to find the best fit for my style.  I have linked a few posts below because I found them useful, and this is a handy way for me to get back to them the next time the question comes up.  I&#8217;m sure I&#8217;ve missed some.  Post your favorite links on turning VIM into an IDE in the comments.</p>
<p>1) <a href="http://mg.pov.lt/blog/unix-is-an-ide">Unix is an IDE</a><br />
2) <a href="http://dancingpenguinsoflight.com/2009/02/python-and-vim-make-your-own-ide/">Python and vim: Make your own IDE</a><br />
3) <a href="http://blog.dispatched.ch/2009/05/24/vim-as-python-ide/">VIM as Python IDE</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.superbob.com/2010/01/02/vim-as-an-ide/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New project: Uplifter</title>
		<link>http://www.superbob.com/2009/07/06/new-project-uplifter/</link>
		<comments>http://www.superbob.com/2009/07/06/new-project-uplifter/#comments</comments>
		<pubDate>Mon, 06 Jul 2009 15:34:50 +0000</pubDate>
		<dc:creator>bob</dc:creator>
				<category><![CDATA[python]]></category>
		<category><![CDATA[uplifter]]></category>

		<guid isPermaLink="false">http://www.superbob.com/?p=58</guid>
		<description><![CDATA[I have started a new project (a relatively simple program to upload files to a server).  I thought it would be fun to develop this in the open and talk about design decisions I made.
One thing I want to try is to compare and contrast some different ways to develop the same program.  [...]]]></description>
			<content:encoded><![CDATA[<p>I have started a new project (a relatively simple program to upload files to a server).  I thought it would be fun to develop this in the open and talk about design decisions I made.</p>
<p>One thing I want to try is to compare and contrast some different ways to develop the same program.  I originally wrote some pieces in Python using <a href="http://wxpython.org/">wxPython</a>.  I separated most of the control definition for the one window (essentially a glorified dialog box) in the program.  This information now resides in a separate <a href="http://wiki.wxpython.org/XRCTutorial">xrc</a> resource file.</p>
<p>There is a hefty amount of runtime files needed with this method.  Python and wxPython each require their own software install.  I decided it might be fun to write the interface using <a href="http://www.runrev.com/home/product-family/">Runtime Revolution</a> as well.  This isn&#8217;t free like the Python route, but I already own a copy and any source code I write for this can certainly be free.  I think that the compiled end product will be significantly smaller than a binary distribution using Python.  It will also be mostly self-contained.  I say mostly, because there are still dependencies, but I think they will already be loaded on the OS.</p>
<p>I plan on writing this program for Windows.  Both of the preceding two methods should be cross-platform with little if any changes needed to change between Linux, Mac OSX, or Windows.  However, I&#8217;m thinking of trying a third method, writing the program using <a href="http://www.autohotkey.com/">AutoHotkey</a>.  This would be limited to Windows as far as I know.  From my experience though, these types of programs can be compiled into a relatively tiny binary, that I think only depends on the MSVC runtime.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.superbob.com/2009/07/06/new-project-uplifter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Python SSH made easy</title>
		<link>http://www.superbob.com/2008/05/29/python-ssh-made-easy/</link>
		<comments>http://www.superbob.com/2008/05/29/python-ssh-made-easy/#comments</comments>
		<pubDate>Thu, 29 May 2008 20:23:16 +0000</pubDate>
		<dc:creator>bob</dc:creator>
				<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://www.superbob.com/?p=53</guid>
		<description><![CDATA[Robey Pointer has made programming with SSH attainable for several years now.  However, if you are slow to pick things up like me, the demos only get you about halfway there.  I needed a little extra boost to understand how to use Paramiko.  I just happened to run across the Command Line [...]]]></description>
			<content:encoded><![CDATA[<p>Robey Pointer has made programming with SSH attainable for several years now.  However, if you are slow to pick things up like me, the demos only get you about halfway there.  I needed a little extra boost to understand how to use <a href="https://green.lag.net/paramiko/">Paramiko</a>.  I just happened to run across the Command Line Warriors blog today which has <a href="http://commandline.org.uk/python/2008/may/29/sftp-python-really-simple-ssh/">this little tidbit</a>.  Not only is it brain dead simple to create a little ssh script with this, but looking inside ssh.py has given me a great demo that shows how to use the Paramiko suite for different things that I wanted to try.  I just wrote a file transfer program in four lines.  I&#8217;m sure the jokes on me for being a little dense, but I&#8217;m excited because this has given me the extra help I needed to start using Paramiko.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.superbob.com/2008/05/29/python-ssh-made-easy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Self-Hosted Python</title>
		<link>http://www.superbob.com/2008/05/28/self-hosted-python/</link>
		<comments>http://www.superbob.com/2008/05/28/self-hosted-python/#comments</comments>
		<pubDate>Wed, 28 May 2008 01:10:31 +0000</pubDate>
		<dc:creator>bob</dc:creator>
				<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://www.superbob.com/?p=49</guid>
		<description><![CDATA[Python continues to impress me with things like a C compiler written with Python.  Building special purpose machines with tools like LLVM is beyond me.  It&#8217;s one of those subjects that I seem to doze off reading.  However, I have built a couple grammars with ANTLR.  I just went to see [...]]]></description>
			<content:encoded><![CDATA[<div style=''>Python continues to impress me with things like a <a href="http://people.cs.uchicago.edu/%7Evarmaa/mini_c/">C compiler</a> written with Python.  Building special purpose machines with tools like <a href="http://llvm.org/">LLVM</a> is beyond me.  It&#8217;s one of those subjects that I seem to doze off reading.  However, I have built a couple grammars with <a href="http://www.antlr.org/">ANTLR</a>.  I just went to see what&#8217;s new with ANTLR and saw the <a href="http://www.antlr.org/works/index.html">ANTLRWorks GUI Development Environment</a>.  This would be a pretty good thing for <a href="http://www.dabeaz.com/ply/">PLY</a> to have.</p>
<p>One could use <a href="http://www.parrotblog.org/2008/03/targeting-parrot-vm.html">Parrot</a> to build a Python interpreter, or embed an <a href="http://www.csh.rit.edu/%7Ejon/projects/pip/index.php">interpreter in PHP</a>, but I think I prefer <a href="http://codespeak.net/pypy/dist/pypy/doc/architecture.html#mission-statement">RPython</a> for my alternate implementation.</div>
]]></content:encoded>
			<wfw:commentRss>http://www.superbob.com/2008/05/28/self-hosted-python/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Vim options for python</title>
		<link>http://www.superbob.com/2008/05/23/vim-options-for-python/</link>
		<comments>http://www.superbob.com/2008/05/23/vim-options-for-python/#comments</comments>
		<pubDate>Fri, 23 May 2008 13:40:33 +0000</pubDate>
		<dc:creator>bob</dc:creator>
				<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://www.superbob.com/?p=44</guid>
		<description><![CDATA[Although there are a lot of options for Python editors on the Internet, I have been using some version of VI for far too long to give up my muscle memory of modal editing that VI uses.  Wing IDE actually has decent VI keystroke support, but it doesn&#8217;t go quite far enough, or I [...]]]></description>
			<content:encoded><![CDATA[<p>Although there are a lot of options for Python editors on the Internet, I have been using some version of VI for far too long to give up my muscle memory of modal editing that VI uses.  <a href="http://www.wingware.com/">Wing IDE</a> actually has decent VI keystroke support, but it doesn&#8217;t go quite far enough, or I haven&#8217;t figured out how to make it do what I want.  For instance, I use all sorts of ed commands, and like my macros and buffers.  It looks like the Wing authors are interested in improving the VI personality of the editor, but I&#8217;m impatient.  I think I&#8217;ll have to work at using Wing and file a view bug reports, although I&#8217;m not sure they aren&#8217;t really enhancement reports.</p>
<p>In the meantime, there is a lot of information on the web about how to set up VI to use as a decent Python editor.  <a href="http://blog.sontek.net/2008/05/11/python-with-a-modular-ide-vim/">This article</a> by John M. Anderson was helpful to cover a bunch of the basics.  I also found a great <a href="http://www.halfcooked.com/mt/archives/000400.html">6 easy steps</a> process to get ctags working on Windows.  Maybe this isn&#8217;t such a big deal to you, but I have jumped through a lot more steps before to get this going.  The value here is in the conciseness of the information presented.</p>
<p>I don&#8217;t have my perfect vimrc set up yet, but I am a lot closer after adding <a href="http://www.vim.org/scripts/script.php?script_id=42">BufExplorer</a>, <a href="http://www.vim.org/scripts/script.php?script_id=1658">NerdTree</a>, and <a href="http://www.vim.org/scripts/script.php?script_id=1318">Snippets</a>.  I plan on figuring out more cool stuff that I can post about Vim and Python.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.superbob.com/2008/05/23/vim-options-for-python/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Is there Magic in the Air?</title>
		<link>http://www.superbob.com/2008/05/22/is-there-magic-in-the-air/</link>
		<comments>http://www.superbob.com/2008/05/22/is-there-magic-in-the-air/#comments</comments>
		<pubDate>Thu, 22 May 2008 16:32:22 +0000</pubDate>
		<dc:creator>bob</dc:creator>
				<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://www.superbob.com/?p=40</guid>
		<description><![CDATA[I read a blog entry recently that Steve Yegge wrote last year about what makes great software.  Coincidentally, I have recently been working on better Python integration with Vim and better Vim integration with Firefox.  Steve&#8217;s blog post gives several major criteria for good systems, not that completing the list makes a piece [...]]]></description>
			<content:encoded><![CDATA[<p>I read a blog entry recently that Steve Yegge wrote last year about <a href="http://steve-yegge.blogspot.com/2007/01/pinocchio-problem.html">what makes great software</a>.  Coincidentally, I have recently been working on better <a href="http://python.org/">Python</a> integration with <a href="http://www.vim.org/">Vim</a> and better Vim integration with <a href="http://www.mozilla.com/en-US/firefox/">Firefox</a>.  Steve&#8217;s blog post gives several major criteria for good systems, not that completing the list makes a piece of software good.  Instead good systems should have all point in the list covered.</p>
<ul>
<ol>1) systems should not reboot</ol>
<ol>2) systems must be able to grow (without rebooting)</ol>
<ol>3) a system should have a command shell</ol>
<ol>4) a system should have integration hooks (Steve calls this advice, and it is probably more subtle than &#8220;hooks&#8221;</ol>
<ol>5) systems should have an extension language and a plug-in system</ol>
<ol>6) perhaps the hardest today, systems should be introspective</ol>
</ul>
<p>The article spent a good amount of the space on Firefox.  I think he spent a lot of time trying to explain how to improve Firefox because he would like to use it.  This seems like a win for the Mozilla group to me.  If Firefox was beyond hope, it wouldn&#8217;t take more than a couple sentences to write it off.</p>
<p>The <a href="http://ostatic.com/162291-blog/firefox-3-rc-1-a-guided-tour">newest release candidate</a> of Firefox 3 does not fix the need to reboot, but less memory leaks are a good step in the right direction.  I&#8217;m not to worried about murdering my programs, but is definitely an inconvenience to me when I&#8217;m forced to restart Firefox.  I think working towards no restarts would help stability during normal use.  I would think that all of this stuff should be figured out in the OS anyway, but as Firefox gets more complicated, I supposed it has to take on more aspects of an OS such as proper process and memory management.  It should have a good response to a lack of resources.  The dialog that tells me a script is not responding is a start, but the browser should have better built-in health monitoring if possible.</p>
<p>Steve gives the example of <a href="http://greasemonkey.mozdev.org/">Greasemonkey</a> as a way to extend Firefox without rebooting.  I wonder if add-ons could be written as strictly JavaScript, considering one can specify CSS and write HTML elements along with program logic.  I have also been playing around with <a href="http://groups.csail.mit.edu/uid/chickenfoot/">Chickenfoot</a>.  It has a limited set of <a href="http://groups.csail.mit.edu/uid/chickenfoot/scripts/index.php/ChickenfootExtensionScripts">extension scripts</a>, but I think we need more access to UI elements with Greasemonkey.  For right now, that is held back because of security concerns.</p>
<p>If security is going to be the limiting factor, then we still need a way to install extensions without restarting.  I don&#8217;t know if there is a good way to distinguish whether changes to chrome are safe or not.  Once <a href="http://developer.mozilla.org/en/docs/XULRunner">XUL runner</a> is fully functional and hosting Firefox as an application, maybe the problem will be changed.  Firefox will act like a virtual machine, which might make for seamless restarts, rather than no restarts.</p>
<p>Brendan Eich also wants to let Firefox be <a href="http://weblogs.mozillazine.org/roadmap/archives/008865.html">extended with Python</a>.  If this actually becomes a reality, I anticipate the number and kind of extensions skyrocketing.  JavaScript is pretty easy to work with, but Python seems even better to me.</p>
<p>As far as command shell.  I have been using <a href="http://yubnub.org/">yubnub</a>, which gets you part of the way there.  I recently discovered <a href="http://vimperator.mozdev.org/">vimperator</a>, which provides not only a command-line, but a partial Vim-like environment.  If you don&#8217;t have the piece you already want, just add something to yubnub or vimperator to extend your shell.  Again, I hope that adding python to the mix will allow this to reach even farther and be easier to extend.  I haven&#8217;t become practiced with vimperator yet, but already I can see it&#8217;s usefulness in navigating by keyboard.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.superbob.com/2008/05/22/is-there-magic-in-the-air/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Playing with Python</title>
		<link>http://www.superbob.com/2008/05/19/playing-with-python/</link>
		<comments>http://www.superbob.com/2008/05/19/playing-with-python/#comments</comments>
		<pubDate>Mon, 19 May 2008 14:22:55 +0000</pubDate>
		<dc:creator>bob</dc:creator>
				<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://www.superbob.com/?p=43</guid>
		<description><![CDATA[I recently started playing with Python again.  It is amazing how fast you can pick up information on how to create a service or compile Python into standalone applications for OSX or Windows.
Python also has quite a few GUI frameworks as well as a good number of python web frameworks.
After looking at portability, pre-built [...]]]></description>
			<content:encoded><![CDATA[<p>I recently started playing with Python again.  It is amazing how fast you can pick up information on how to create a <a href="http://essiene.blogspot.com/2005/04/python-windows-services.html">service</a> or compile Python into standalone applications for <a href="http://svn.pythonmac.org/py2app/py2app/trunk/doc/index.html">OSX</a> or <a href="http://www.py2exe.org/">Windows</a>.</p>
<p>Python also has <a href="http://wiki.python.org/moin/TkInter">quite</a> <a href="http://www.pygtk.org/">a</a> <a href="http://wiki.python.org/moin/PyQt">few</a> <a href="http://sourceforge.net/projects/pyxul">GUI</a> <a href="http://wxpython.org/">frameworks</a> as well as <a href="http://www.djangoproject.com/">a</a> <a href="http://turbogears.org/">good</a> <a href="http://mdp.cti.depaul.edu/">number</a> <a href="http://webpy.org/">of</a> <a href="http://www.zope.org/">python</a> <a href="http://plone.org/">web</a> <a href="http://www.mems-exchange.org/software/quixote/">frameworks</a>.</p>
<p>After looking at portability, pre-built binaries, ease of building a program, and ease of compiling, I have settled on wxpython as a GUI framework for now, although I have used all of these except pyxul to build different applications.  Either <a href="http://www.pythonxy.com/foreword.php">Python(x,y)</a> or <a href="http://www.enthought.com/products/epd.php">Enthought</a> provides a pretty comprehensive Windows package including WxPython.  The former also has PyQT as well.</p>
<p>The web framework question is a lot tougher.  I have played around with Turbogears, Pylons, Django, and web.py (if that can be called a framework), but I haven&#8217;t built anything serious with any of these.  I recently came across web2py.  I like that it seems to give a built-in tool to add new applications.  It also seems to have some of the built-in administration screens like Django.  I am working on building a sample website with it now, both to teach myself and to show others a framework example.  Since web2py was built with education in mind, it seems a more natural fit for this last purpose.  A long time ago, I was messing around with Zope.  Although Zope and Plone are pretty powerful, I dont&#8217; think I would use them as teaching examples.</p>
<p>More exciting for me than playing around with Python, I have been attempting to teach it to other people.  It just seems to  flow naturally, both to CS students who have had experiences with other languages, and with complete newbies.  I really like <a href="http://www.diveintopython.org/">Dive into Python</a>, but have been looking at other sources such as <a href="http://www.swaroopch.com/byteofpython/">Byte of Python</a>, a <a href="http://learnpython.pbwiki.com/HowToStart">starter wiki</a>, and <a href="http://en.wikibooks.org/wiki/Programming:Python">Wikibooks</a> as well.  </p>
<p>Eventually, I hope to be able to apply some of this knowledge to <a href="http://wiki.sugarlabs.org/go/Main_Page">Sugar</a> which has really intrigued me.  Perl had a project to recreate a lot of the Unix tools in Perl.  I have a Perl OS archive saved for years now.  I think a lot of these can be recreated in Python, but the idea of creating a whole interface in Python seems to be an even greater amount of work with a possibly greater payoff.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.superbob.com/2008/05/19/playing-with-python/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
