<?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:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Itinerant Source</title>
	<atom:link href="http://blog.kapilt.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.kapilt.com</link>
	<description>Python and Zope Programming</description>
	<pubDate>Wed, 02 Jul 2008 20:52:36 +0000</pubDate>
	<generator>http://wordpress.org/?v=MU</generator>
	<language>en</language>
			<item>
		<title>Introducing Content Mirror</title>
		<link>http://blog.kapilt.com/2008/07/02/introducing-content-mirror/</link>
		<comments>http://blog.kapilt.com/2008/07/02/introducing-content-mirror/#comments</comments>
		<pubDate>Wed, 02 Jul 2008 20:52:36 +0000</pubDate>
		<dc:creator>kapilt</dc:creator>
		
		<category><![CDATA[plone]]></category>

		<category><![CDATA[sqlalchemy]]></category>

		<category><![CDATA[zope]]></category>

		<guid isPermaLink="false">http://kapilt.wordpress.com/?p=19</guid>
		<description><![CDATA[A few weeks ago at the New Orleans symposium in Plone, I presented on some software I was writing called Content Mirror, which is an addon product for Plone content serialization to a structured/relational database. Its a tool for doing content data deployments. Its nothing particularly new,  Alan and I have been talking about the [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>A few weeks ago at the New Orleans symposium in Plone, I presented on some software I was writing called Content Mirror, which is an addon product for Plone content serialization to a structured/relational database. Its a tool for doing content data deployments. Its nothing particularly new,  Alan and I have been talking about the deployment story for Plone since 2002. I was building CMFDeployment at the time for pushing out static copies of plone sites for ultra-secure systems. Alan and EnfoldSystems went on to build a data deployment solution in Entransit, for doing data deployments. Both were fairly succesful deployment solutions and are still in use and deployed today by a variety of Plone vendors. But both also had some failings, they required alot of configuration and committment to get working for an existing plone site. For example, Entransit required using the instance layout and additional products needed by EnSimpleStaging. While CMFDeployment has a bewildering array of configuration options. In my opinion, both are specialized consulting ware, ie. their primary deployed successfully by folks doing Plone development full time.</p>
<p>For most of the last year, I&#8217;ve primarily been doing Zope3 applications, in relational databases. A large part of the reason why I&#8217;ve enjoyed Zope3 so much, is that the impedence mismatch between application development is much less than with Plone. Paul Everitt asked at the first Plone conference in New Orleans if Plone was a Product or Framework. Its a question still heard in the community to this day. But to me the answer is clear, Plone is a product, and frankly thats a good thing for both the software and its users. Its however a bad thing when your building applications, their tends to be much more policy with products, that needs to be replaced or worked around when your building on them. As a result, products tend to have two other downsides in application development, developer inefficiencies and computational ineffiencies.</p>
<p>As an example of a developer inefficiency, one is evident just in starting up and serving a page from Plone. I call it the Plone tax, and over the course of a year its about a man month of work. This becomes more stark in comparison to other web app frameworks ( pylons, django, rails, z3, etc) which startup and serve a page in a few seconds. There&#8217;s been alot of work recently to this with plone.reload, optional loading of translations, and some heroic work by hanno, but the fact is that there is a lot of code to load up as well as data from the zodb to startup and serve a page in Plone.</p>
<p>Developer inefficiencies are also evident in the learning curve associated with being productive with a product. A product is typically a much bigger software stack, and Plone has and utilizes many components, from zope2, zope3, cmf, archetypes providing foundations, in addition to a growing number of plone specific infrastructure. Plone is the OpenOffice of opensource content management systems. We could drop in a pylons in a cubby hole of a plone tarball. Smaller systems offer a much better productivity to new developers, by giving them the ability to focus on the problem domain and solution, rather than how to frame the problem domain in terms of product concepts and contexts like Plone.</p>
<p>The real key in a data deployment scenario is to keep all the many and great features of Plone as part of the content management process, but also making that data accessible for use in other applications. By deploying content to an rdbms we get language and framework neutrality to interact with it, as well as access to a widespread number of developers and tools. In a nutshell, its data portability.</p>
<p>As a bonus, when using Plone as a product, and reserving customizations to applications onto of the content of a data deployment, the migration story for a Plone instance also becomes much easier.</p>
<p>In terms of computation inefficiency,  Plone does alot of work, which makes it easier to use as a product, but its also computationaly expensive for content delivery compared to simpler solutions that fit the needs of an application/problem domain. ie. the first rule of optimization, do less work. Replacing Plone as a content delivery mechanism, is a great way to make a system more responsive and vertically scalable, while still allowing a dynamic system.</p>
<p>Plone is a great product, and out of the box its offers ease of through the web customization, installation, and a wide range of functionality. My goal for data deployment with Plone was to make something that would enable reusing Plone as a product, as a content management system, but would allow flexibility in usage of that data. Moreover a tool that was easy to drop into new or existing sites.</p>
<p>Data deployments can also bring new features into a Plone. Its much easier to mine business intelligence and reports out of a relational system. For example getting graphs of content creation broken down by month and type or user or using commercial reporting tools.</p>
<p>So back to introducing content mirror. Its basically a system for doing data deployments, it features.. .</p>
<p>- Out of the Box support for Default Plone Content Types.<br />
- Out of the Box support for all builtin Archetypes Fields (including files,<br />
and references ).<br />
- Support for 3rd Party / Custom Archetypes Content Types in one line of configuration.<br />
- Supports Capturing Containment and Workflow in the serialized database.<br />
- Completely Automated Mirroring, zero configuration required beyond installation.<br />
- Easy customization via the Zope Component Architecture<br />
- Elegant and Simple Design, less than 600 lines of code, extensive doctests<br />
- Support for Plone 2.5, 3.0, and 3.1<br />
- Opensource ( GPLv3 )</p>
<p>installation docs<br />
<a href="http://code.google.com/p/contentmirror/wiki/Installation" target="_blank">http://code.google.com/p/contentmirror/wiki/Installation</a></p>
<p>technical introduction / readme<br />
<a href="http://code.google.com/p/contentmirror/wiki/Introduction" target="_blank">http://code.google.com/p/contentmirror/wiki/Introduction</a></p>
<p>in a nutshell its technical architecture, is an event observers with aggregation by object on txn boundaries, using an operation pattern for serialization actions, along with schema transformation of archetypes to relational databases tables, using a sqlalchemy runtime generated orm layer. the technical introduction goes into more details.</p>
<p><img class="INkyme" src="http://mail.google.com/mail/images/cleardot.gif" alt="" /></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/kapilt.wordpress.com/19/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/kapilt.wordpress.com/19/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/kapilt.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/kapilt.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/kapilt.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/kapilt.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/kapilt.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/kapilt.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/kapilt.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/kapilt.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/kapilt.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/kapilt.wordpress.com/19/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.kapilt.com&blog=785435&post=19&subd=kapilt&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://blog.kapilt.com/2008/07/02/introducing-content-mirror/feed/</wfw:commentRss>
	
		<media:content url="http://mail.google.com/mail/images/cleardot.gif" medium="image" />
	</item>
		<item>
		<title>Zipped Packages on App Engine :-(</title>
		<link>http://blog.kapilt.com/2008/05/30/zipped-packages-on-app-engine/</link>
		<comments>http://blog.kapilt.com/2008/05/30/zipped-packages-on-app-engine/#comments</comments>
		<pubDate>Fri, 30 May 2008 04:46:48 +0000</pubDate>
		<dc:creator>kapilt</dc:creator>
		
		<category><![CDATA[cloud]]></category>

		<category><![CDATA[python]]></category>

		<category><![CDATA[zope]]></category>

		<guid isPermaLink="false">http://kapilt.wordpress.com/?p=18</guid>
		<description><![CDATA[as part of an ongoing project to get zope3 running well on google app engine, i worked on loading python code from zipped egg files. I started by following guido&#8217;s hint in the corresponding appengine issue. As google appengine doesn&#8217;t contain the zipimport builtin extension, i relied on using the python svn sandbox code that [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>as part of an ongoing project to get zope3 running well on google app engine, i worked on loading python code from zipped egg files. I started by following guido&#8217;s hint in the corresponding <a title="appengine issue" href="http://code.google.com/p/googleappengine/issues/detail?id=161&amp;colspec=ID%20Type%20Status%20Priority%20Stars%20Owner%20Summary">appengine issue</a>. As google appengine doesn&#8217;t contain the zipimport builtin extension, i relied on using the <a title="python svn sandbox code" href="http://svn.python.org/projects/sandbox/trunk/import_in_py">python svn sandbox code</a> that implements imports in pure python, and uses the zipfile module on top of that to provide a zip import facility. I checked out the import in py code, and added the following to get it working in google app engine dev server.</p>
<pre>import os.path, imp, types
from zipimport_ import zipimport

imp.new_module = types.ModuleType
imp.PY_SOURCE = 1
imp.PY_COMPILED = 2

def load_zipegg( egg_path ):
    egg_file = os.path.basename( egg_path )
    egg_name = egg_file.split('-',1)[0]
    head = egg_name.split(&#8217;.')[0]
    importer = zipimport.zipimporter( egg_path )
    # we load the head, the importer loads any contained modules
    importer.load_module( head )
</pre>
<p>unfortunately while it works ok on the dev server, it doesn&#8217;t work on appengine :-(, due to a non implementation of marshall.dumps. i&#8217;ve appended a comment to that effect on the issue.</p>
<p>in a nutshell you hand it hand it the path to an egg, and it loads the egg code. Its not 100% perfect, it has some issues with minor namespace&#8217;d eggs (stomps  on __path__, extraneous sys.modules entry created in subpackages). Hopefully its useful to those wanting to build larger applications or utilize frameworks other than the builtin django.</p>
<p>It does add considerably to the startup time for an app, which went from .3-.5s  to .9-1s. after this initial load that particular app server instance has a cached sys.modules to work with, and startup time is neglible.</p>
<p>The <a title="porting of zope3 to appengine" href="http://blog.kapilt.com/2008/05/27/16/">porting of zope3 to appengine</a>, still needs some support for zip contained resources, such as configuration, presentation templates, and browser resources. Even just zipping the packages without those, gets a simple zope3 application down to ~350 files.</p>
<p>Currently i&#8217;m just zipping individual directory eggs, with some filtering for pyc, so, text, and test files. Load time would likely go considerably faster if addons were packaged in a single egg.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/kapilt.wordpress.com/18/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/kapilt.wordpress.com/18/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/kapilt.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/kapilt.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/kapilt.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/kapilt.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/kapilt.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/kapilt.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/kapilt.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/kapilt.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/kapilt.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/kapilt.wordpress.com/18/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.kapilt.com&blog=785435&post=18&subd=kapilt&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://blog.kapilt.com/2008/05/30/zipped-packages-on-app-engine/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Zope3 on App Engine - Redux</title>
		<link>http://blog.kapilt.com/2008/05/28/17/</link>
		<comments>http://blog.kapilt.com/2008/05/28/17/#comments</comments>
		<pubDate>Wed, 28 May 2008 12:26:56 +0000</pubDate>
		<dc:creator>kapilt</dc:creator>
		
		<category><![CDATA[cloud]]></category>

		<category><![CDATA[python]]></category>

		<category><![CDATA[zope]]></category>

		<guid isPermaLink="false">http://blog.kapilt.com/2008/05/28/17/</guid>
		<description><![CDATA[I published a minimal zope3 app on app engine, along the lines of what of my post from yesterday. you can check it out at http://zope3.appspot.com
its basically a minimal zope3 application, using a custom publication, and bootstraping some components via zcml.
also a simple test runner for verifying packages on the google app engine
http://zope3.appspot.com/tests
the minimal egg [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I published a minimal zope3 app on app engine, along the lines of what of <a id="xdkm" title="my post" href="http://blog.kapilt.com/2008/05/27/16/">my post</a> from yesterday. you can check it out at<a id="y.tt" title="http://zope3.appspot.com" href="http://zope3.appspot.com"> http://zope3.appspot.com</a></p>
<p>its basically a minimal zope3 application, using a custom publication, and bootstraping some components via zcml.</p>
<p>also a simple test runner for verifying packages on the google app engine<br />
<a id="yyvr" title="http://zope3.appspot.com/tests" href="http://zope3.appspot.com/tests">http://zope3.appspot.com/tests</a></p>
<p>the minimal egg working set used by the app.</p>
<pre>zope.deprecation-3.4.0-py2.5.egg
zope.publisher-3.5.2-py2.5.egg
appengine_monkey-0.1dev_r28-py2.5.egg
zope.dottedname-3.4.2-py2.5.egg
zope.schema-3.4.0-py2.5.egg
zope.event-3.4.0-py2.5.egg
zope.tal-3.4.1-py2.5.egg
zope.exceptions-3.5.2-py2.5.egg
zope.tales-3.4.0-py2.5.egg
zope.i18n-3.4.0-py2.5.egg
zope.testing-3.5.1-py2.5.egg
transaction-1.0a1-py2.5.egg
zope.i18nmessageid-3.4.3-py2.5-macosx-10.5-i386.egg
zope.thread-3.4-py2.5.egg
zope.component-3.4.0-py2.5.egg
zope.interface-3.4.1-py2.5-macosx-10.5-i386.egg
zope.traversing-3.5.0a3-py2.5.egg
zope.configuration-3.4.0-py2.5.egg
zope.location-3.4.0-py2.5.egg
zope.deferredimport-3.4.0-py2.5.egg
zope.pagetemplate-3.4.0-py2.5.egg
</pre>
<p>several modifications to the eggs were nesc to remove security.proxy references, and remove some BBB/deprecated code.</p>
<p>This set of eggs,  just fits in under the 1000 file limit ( after manually removing extra locales in zope.i18n and pytz, its about 980 ).  we could slim the eggs down a bit, ditch the docs and the tests for a minimal egg, and maybe have a ceiling of 200-300 to play with. but clearly for most zope/grok applications, which will be using a quite a bit more eggs,  zip based imports are probably the only realistic option.</p>
<p>Loading zope is about a half-second, but once its initialized, subsequent executions run fast, from a timer around the import statements,</p>
<pre>Initial Request      Zope Load Time -0.588495016098
Subsequent Request   Zope Load Time -0.000102996826172</pre>
<p>in terms of exploring zip based imports, the suggestion guido pointed out in GAE issue 161, was using something like <a id="fj23" title="importlib/zipimport" href="http://svn.python.org/view/sandbox/trunk/import_in_py/zipimport_/">importlib/zipimport</a> to manually load zip archives/eggs, for another day.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/kapilt.wordpress.com/17/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/kapilt.wordpress.com/17/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/kapilt.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/kapilt.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/kapilt.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/kapilt.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/kapilt.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/kapilt.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/kapilt.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/kapilt.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/kapilt.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/kapilt.wordpress.com/17/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.kapilt.com&blog=785435&post=17&subd=kapilt&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://blog.kapilt.com/2008/05/28/17/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Zope3 on Google App Engine</title>
		<link>http://blog.kapilt.com/2008/05/27/16/</link>
		<comments>http://blog.kapilt.com/2008/05/27/16/#comments</comments>
		<pubDate>Tue, 27 May 2008 19:57:10 +0000</pubDate>
		<dc:creator>kapilt</dc:creator>
		
		<category><![CDATA[cloud]]></category>

		<category><![CDATA[python]]></category>

		<category><![CDATA[zope]]></category>

		<guid isPermaLink="false">http://blog.kapilt.com/2008/05/27/16/</guid>
		<description><![CDATA[a few weeks ago, i did some exploration, of getting zope3 up and running on app engine, with some discussion in a grok thread. there&#8217;s been some interest in the topic, so i wrote it up for a wider audience.
there&#8217;s a number of issues with getting zope3 up and running.
- no c extensions ( no [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>a few weeks ago, i did some exploration, of getting zope3 up and running on app engine, with some discussion in a grok thread. there&#8217;s been some interest in the topic, so i wrote it up for a wider audience.</p>
<p>there&#8217;s a number of issues with getting zope3 up and running.</p>
<p>- no c extensions ( no proxy, speedups, persistent, etc)<br />
- 1000k file limit<br />
- restricted python language</p>
<p><strong>C Extensions</strong></p>
<div id="cyn70">the lack of the C extensions does away with a large portion of zope3 from being able to run without modification. this is immediately visible upon trying to import basic zope components ( such as  zope.component) the zope.deferredmodule is used throughout the codebase, to speed startup time, and breaks as its implementation uses the proxy c extension.</p>
<p>i went ahead and replaced the usage there with a pure python implementation. it passes all but one of the unit tests. that test in particular uses an isinstance check of the proxy against the types.ModuleType, and is the reason the c extension is required. i went ahead and tested the implementation with my existing zope3 development instances (all rdb storage, no zodb present), and this particular check was never an issue. the modified <a id="swbz" title="zope.deferredmodule egg" href="http://kapilt.com/dist/zope.deferredimport-3.5.0dev-py2.5.egg">zope.deferredmodule egg</a> and <a id="cvt6" title="source diff" href="http://kapilt.com/dist/zope.deferredimport.patch">source diff</a> against trunk are <a id="zu3i" title="here." href="http://kapilt.com/dist/">here.</a></p>
<div id="0" style="text-align:left;">the removal of other extensions, causes numerous other packages to not be useable. a rule of thumb i found in executing unit tests so far on app engine  is that zope.* packages work ok (zope.schema, zope.interface,, zope.configuration, zope.pagetemplate), but zope.app.* tend to have some use of security proxies, location proxies, or persistence, any of which cause an import error.<br />
functionally, it isn&#8217;t a typical zope environment in any sense, its a collection as an application using zope egg components. there isn&#8217;t any zodb, but thats not really an issue for most of the zope core components. potentially though existing components could be used with some sort of modification to use null/dummy implementations as was done for zope.deferredimport.</p>
</div>
<p>larger legacy frameworks like zope2 and plone are two intimately wedded with implementation choices of c extensions, that are incompatible with appengine to work without major rewriting efforts.</p>
<p><strong>1000K file limit<br />
</strong><br />
Google app engine maintains a hard limit on the number of files in an application. See <a id="s5ua" title="Issue 161" href="http://code.google.com/p/googleappengine/issues/detail?id=161&amp;q=1000%20files&amp;colspec=ID%20Type%20Status%20Priority%20Stars%20Owner%20Summary">Issue 161</a> for details ( to vote for it click the star ).</p>
<p>Zope quickly can run into this file limit, checking for a file count in a zope3 app&#8217;s buildout eggs directory</p>
<pre>  $ find . -type f  | wc -l
  4980
</pre>
<p>across this many eggs</p>
<pre>  $ ls -al | wc-l
  139
</pre>
<p>crucial to getting zope3 as an appserver on gae, will running well be running on zipped eggs, to minimize the files resources we need. in order to do that there are a couple of facilities that need support opening files via pkg_resources to support zipped eggs in the core. the zcml include directive, so that we can load and register components via zcml and do bootstrap on the system. and new view/page directives that allow for page template file to be loaded from resources ( not zope.app.pagetemplate which introduce security proxies during traversal). things like browser resources are best left served as static files from the app engine environment. <strong></strong></p>
<p><strong>Deployment</strong></p>
<p>Ian did a <a id="q" title="nice write up" href="http://blog.ianbicking.org/2008/04/13/app-engine-and-pylons/">nice write up</a> and <a id="ptl9" title="introduction" href="http://code.google.com/p/appengine-monkey/wiki/Pylons">introduction</a> of getting pylons working on gae, using virtual env. the same directions work well in setting up a zope3 wsgi app.</p>
<p><strong>Startup Time</strong></p>
<p>this is a bit speculative in terms of application to gae, but typical startup time for a zope3 app to be initialized is around 3.5-4s (on my laptop 2.16ghz core duo) with some trimming of excess zcml. The notion is that app caching will allow us to initialize a python cgi process for multiple requests at startup and rely on the import caching and global registry at a module scope, via defining a main function entry point for request processing separate from initialization. <a href="http://code.google.com/appengine/docs/python/appcaching.html">http://code.google.com/appengine/docs/python/appcaching.html</a></p>
<p><strong>Status</strong></p>
<p>You can do simple publisher applications and use the component architecture (without c extension optimizations), and simple page template files.<br />
<strong><br />
</strong></p>
</div>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/kapilt.wordpress.com/16/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/kapilt.wordpress.com/16/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/kapilt.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/kapilt.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/kapilt.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/kapilt.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/kapilt.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/kapilt.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/kapilt.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/kapilt.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/kapilt.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/kapilt.wordpress.com/16/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.kapilt.com&blog=785435&post=16&subd=kapilt&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://blog.kapilt.com/2008/05/27/16/feed/</wfw:commentRss>
		</item>
		<item>
		<title>ore.xapian - indexing and searching in zope3</title>
		<link>http://blog.kapilt.com/2008/05/08/orexapian-indexing-and-searching-in-zope3/</link>
		<comments>http://blog.kapilt.com/2008/05/08/orexapian-indexing-and-searching-in-zope3/#comments</comments>
		<pubDate>Thu, 08 May 2008 07:59:03 +0000</pubDate>
		<dc:creator>kapilt</dc:creator>
		
		<category><![CDATA[python]]></category>

		<category><![CDATA[zope]]></category>

		<guid isPermaLink="false">http://kapilt.wordpress.com/?p=15</guid>
		<description><![CDATA[i released the ore.xapian package to pypi a few weeks back, and after a few iterations i&#8217;ve got in production on few small applications, its a thin layer on top of xappy to give an indexing framework for zope3 based applications.
its pretty xapian agnostic.. its designed as an async indexing framework, with abstractions for content [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>i released the ore.xapian package to pypi a few weeks back, and after a few iterations i&#8217;ve got in production on few small applications, its a thin layer on top of xappy to give an indexing framework for zope3 based applications.</p>
<p>its pretty xapian agnostic.. its designed as an async indexing framework, with abstractions for content indexers, content storage/ resolution, transactional flush into the indexing queue, manages reopening search connections, etc.</p>
<p>the pypi page goes into a bit more detail (doctest style).<br />
<a title="http://pypi.python.org/pypi/ore.xapian" href="http://pypi.python.org/pypi/ore.xapian"> http://pypi.python.org/pypi/ore.xapian</a></p>
<p>i&#8217;m using it succesfully to index content from relational databases and subversion with a zope3 front end. only real todo is to make the index queue persistent for remote indexers, but to be useful that<br />
would need corresponding support for remote search connections in xappy. unfortunately i don&#8217;t have the bandwidth for the latter atm, but the details are here.</p>
<p><a title="http://groups.google.com/group/xappy-discuss/browse_thread/thread/7ae9fb8d212529b2" href="http://groups.google.com/group/xappy-discuss/browse_thread/thread/7ae9fb8d212529b2">http://groups.google.com/group/xappy-discuss/browse_thread/thread/7ae9fb8d212529b2</a></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/kapilt.wordpress.com/15/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/kapilt.wordpress.com/15/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/kapilt.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/kapilt.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/kapilt.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/kapilt.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/kapilt.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/kapilt.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/kapilt.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/kapilt.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/kapilt.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/kapilt.wordpress.com/15/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.kapilt.com&blog=785435&post=15&subd=kapilt&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://blog.kapilt.com/2008/05/08/orexapian-indexing-and-searching-in-zope3/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Zope3 Relational Apps - Part one ditch the ZODB</title>
		<link>http://blog.kapilt.com/2008/05/03/zope3-relational-apps-part-one-ditch-the-zodb/</link>
		<comments>http://blog.kapilt.com/2008/05/03/zope3-relational-apps-part-one-ditch-the-zodb/#comments</comments>
		<pubDate>Sat, 03 May 2008 15:51:58 +0000</pubDate>
		<dc:creator>kapilt</dc:creator>
		
		<category><![CDATA[python]]></category>

		<category><![CDATA[zope]]></category>

		<guid isPermaLink="false">http://kapilt.wordpress.com/?p=14</guid>
		<description><![CDATA[I&#8217;ve been working for the last year primarily on Zope3 relational applications, and have assembled various packages and practices for making them. I&#8217;ve recently begun publishing most of these packages as eggs to the cheeseshop, but I&#8217;ve had requests to give more examples of usage. 
The first part of the process constructing a relational app, i [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I&#8217;ve been working for the last year primarily on Zope3 relational applications, and have assembled various packages and practices for making them. I&#8217;ve recently begun publishing most of these packages as eggs to the cheeseshop, but I&#8217;ve had requests to give more examples of usage. </p>
<p>The first part of the process constructing a relational app, i engaged in was to remove the zodb. The primary reason for this was to remove zodb deployment considerations ( setting up zeo,etc) so that applications can be deployed easily via mod_wsgi, or have multiple front ends without any special setup of additional components. </p>
<p>The result of this was the ore.wsgiapp, originally it was just the output of a zopeproject paster template, modified to remove the ZODB startup. However, Jim Fulton refactored the zope.publisher that drives to include paste support and support for custom publications directly within it, greatly simplifying the process of setting up zope without the zodb.</p>
<p><strong>Embracing WSGI</strong></p>
<p>ore.wsgiapp constructs zope3 applictaions that areentirely driven by wsgi, there is no zope.conf file, only a paster config file for configuring an application and its components.</p>
<p><strong>Installation</strong></p>
<p>if your in a buildout just ore.wsgiapp to your eggs section.. or for the virtualenv/setuptools raw usage:</p>
<pre> easy_install ore.wsgiapp</pre>
<p><strong>Constructing an application</strong></p>
<p>First we need to define an object which implements IApplication, which will be the root of our published application, useful base classes for this purpose  are in the ore.wsgiapp.app module:</p>
<pre>  from ore.wsgiapp import app

  class MyApplication( app.Application ): pass</pre>
<p>now if we register this object as a utility it will be the root object published by zope. we&#8217;ll do this in zcml in a separate step.</p>
<p><strong>Creating an application view</strong></p>
<p>you will still need to do all the basics to register/provide views of this object. for the purposes of this example, we&#8217;ll add a basic view to echo hello world:</p>
<pre>class AppView( object ):
    """ a simple view we register for the application """ 
    def __init__( self,context, request):
        self.context = context
        self.request = request
 
    def __call__( self ):
        return "Hello World"</pre>
<p><strong>ZCML in Detail</strong></p>
<p>so here&#8217;s a sample zcml to regiser the app as a utility, and include a basic zope3 environment.</p>
<pre>&lt;configure xmlns="http://namespaces.zope.org/zope"
           xmlns:browser="http://namespaces.zope.org/browser"&gt;

  &lt;include package="zope.app.zcmlfiles" file="meta.zcml" /&gt;
  &lt;include package="zope.publisher" /&gt;
  &lt;include package="zope.traversing" /&gt;
  &lt;include package="zope.app.zcmlfiles" /&gt;

  &lt;!-- We override the default zope publisher request factory which expects a zodb --&gt;
  &lt;includeOverrides package="ore.wsgiapp"/&gt;

  &lt;!-- Application to publish --&gt;
  &lt;utility
     provides="ore.wsgiapp.interfaces.IApplication"
     factory="exampleapp.MyApplication"
     /&gt;

  &lt;!-- Default View for Test Application --&gt;
  &lt;browser:page
      name="index.html"
      for="ore.wsgiapp.interfaces.IApplication"
      class="exampleapp.AppView"
      permission="zope.Public"
      /&gt;
&lt;/configure&gt;</pre>
<p> </p>
<p><strong>Paste Configuration</strong></p>
<p>To use with Paste, you include a configuration section like the following:</p>
<pre>  [app:zope]
  use = egg:ore.wsgiapp
  zcml = site.zcml</pre>
<p> <br />
you can also turn on devmode here, for pdb post mortem debugging and template reloading. go ahead and save this file as debug.ini for the next step.</p>
<p><strong>Running It</strong></p>
<p>using a paster, its as simple as</p>
<pre>./bin/paster debug.ini</pre>
<p>and now we can visit our webserver to get a nice hello world <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  zope3 no zodb.. <br />
 </p>
<p><strong>Application Initialization</strong></p>
<p>Its often useful to defer application setup till after the application has finished loading its configuration, so that component architecture is fully configured. in order to allow for this, ore.wsgiapp generates a IWSGIApplicationCreatedEvent with the application as an attribute. we can register a subscriber for this in zcml, and it will be invoked after configuration is loaded. </p>
<p>As an example we&#8217;ll use an event subscriber to:<br />
 </p>
<pre>  &gt;&gt;&gt; from zope.app.component import site
  &gt;&gt;&gt; from zope.app.container.sample import SampleContainer
  &gt;&gt;&gt;

  &gt;&gt;&gt; def appSetUp( app, eventevent ):
        """Initialize an application"""
        # setup a local site manager
        sm = site.LocalSiteManager( self.context )
        self.context.setSiteManager( sm )
        # add a folder
        app['news'] = SampleContainer()</pre>
<p> <br />
<strong>Futures</strong><br />
using the zope.publisher.paste support added by jim fulton, currently ore.wsgiapp jumps through some hoops to use the existing wsgi support within zope.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/kapilt.wordpress.com/14/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/kapilt.wordpress.com/14/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/kapilt.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/kapilt.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/kapilt.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/kapilt.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/kapilt.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/kapilt.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/kapilt.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/kapilt.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/kapilt.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/kapilt.wordpress.com/14/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.kapilt.com&blog=785435&post=14&subd=kapilt&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://blog.kapilt.com/2008/05/03/zope3-relational-apps-part-one-ditch-the-zodb/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Back to emacs</title>
		<link>http://blog.kapilt.com/2008/05/02/back-to-emacs/</link>
		<comments>http://blog.kapilt.com/2008/05/02/back-to-emacs/#comments</comments>
		<pubDate>Fri, 02 May 2008 16:10:38 +0000</pubDate>
		<dc:creator>kapilt</dc:creator>
		
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://kapilt.wordpress.com/?p=13</guid>
		<description><![CDATA[after a pair coding session with malthe borch, i decided to give emacs a more determined effort. first i culled my .emacs of a bunch of items that i had picked up from people over the years ( i think originally got most of it from jim fulton, and Ken Manheimer. Then i started hunting [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>after a pair coding session with <a title="Malthe Borch" href="http://mockit.blogspot.com/">malthe borch</a>, i decided to give emacs a more determined effort. first i culled my .emacs of a bunch of items that i had picked up from people over the years ( i think originally got most of it from jim fulton, and Ken Manheimer. Then i started hunting for emacs modes to customize  my environment, i found a few cool modes to emulate the textmate tricks i picked up. </p>
<p>yasnippet - <a title="http://code.google.com/p/yasnippet/" href="http://code.google.com/p/yasnippet/">http://code.google.com/p/yasnippet</a>/  the power of textmate snippets in emacs!</p>
<p>select word function, from the helpful folks at on the #emacs channel</p>
<p><span>[11:44] <span> </span></span><strong>consolers</strong><span> </span>hazmat: (defun hazmat-select-word () (interactive) (kill-new (thing-at-point &#8216;word)))</p>
<p><span>[11:45] <span> </span></span><strong>consolers</strong><span> </span>then you can M-x hazmat-select-word or (global-set-key  &lt;your favourite keybinding&gt; &#8216;hazmat-select-word) </p>
<p>i also checked out the python-mode svn, which revealed a pycomplete mode! for basic python completion. rockin. i integrated in pyflakes via flyweight mode for on the fly syntax checking.</p>
<p>for good measure i also added in, ido-mode, which gives nice completion for buffers/files ( built in to emacs) although anything.el also looks intriguing.</p>
<p> </p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/kapilt.wordpress.com/13/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/kapilt.wordpress.com/13/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/kapilt.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/kapilt.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/kapilt.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/kapilt.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/kapilt.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/kapilt.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/kapilt.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/kapilt.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/kapilt.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/kapilt.wordpress.com/13/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.kapilt.com&blog=785435&post=13&subd=kapilt&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://blog.kapilt.com/2008/05/02/back-to-emacs/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Python Code Completion</title>
		<link>http://blog.kapilt.com/2008/04/09/12/</link>
		<comments>http://blog.kapilt.com/2008/04/09/12/#comments</comments>
		<pubDate>Wed, 09 Apr 2008 05:07:33 +0000</pubDate>
		<dc:creator>kapilt</dc:creator>
		
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://blog.kapilt.com/2008/04/09/12/</guid>
		<description><![CDATA[Working with large code bases like Zope and Plone can quickly give your hands a workout. I&#8217;ve been looking around for some good python completion tools that i can use directly from textmate or emacs.
the critical comparison test for any such tools.

works well with large codebases.
opensource

ctags/gtags
not directly related to completion, but exuberant tags / ctags [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Working with large code bases like Zope and Plone can quickly give your hands a workout. I&#8217;ve been looking around for some good python completion tools that i can use directly from textmate or emacs.</p>
<p>the critical comparison test for any such tools.</p>
<ul>
<li>works well with large codebases.</li>
<li>opensource</li>
</ul>
<p><strong>ctags/gtags</strong></p>
<p>not directly related to completion, but exuberant tags / ctags gives the ability to lookup symbol (classes, methods, functions) definitions,  and jump around a code base is incredibly useful. conceivably you could build a usable completion tool directly from a ctags file, that did symbol completion rather than context aware completion.</p>
<p>http://ctags.sourceforge.net/</p>
<p>gtags, a variant from google,  sets up source with a client/server index, and is more appropriate for a symbol completion scenario.</p>
<p><strong>rope</strong></p>
<p>http://rope.sourceforge.net</p>
<p>a re-factoring library. lots of unit tests. editing centric api is a bit of challenge to use for the lightweight integration i&#8217;m looking for.</p>
<p><strong>KomodoEdit</strong></p>
<p>was recently open-sourced. Komodo is a pretty nice dynamic language ide with supprot for ruby/perl/python/xslt and more. Some of the more critical features for an IDE were unfortunately not included in the opensourcing, like a debugger. it does however have a very nice cross language code intelligence system (codeintel package), based on static analysis. which with a little bit of effort could be made into a nice library for use any ide.</p>
<p>http://www.openkomodo.com/</p>
<p><strong>PyDev</strong></p>
<p>the eclipse plugins seems to utilize a dynamic inspection in a separate thread with a socket interface for driving the system via the GUI. the technique at least easily ported to other environments, although i cringe at the notion of random code execution by such a tool.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/kapilt.wordpress.com/12/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/kapilt.wordpress.com/12/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/kapilt.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/kapilt.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/kapilt.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/kapilt.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/kapilt.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/kapilt.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/kapilt.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/kapilt.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/kapilt.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/kapilt.wordpress.com/12/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.kapilt.com&blog=785435&post=12&subd=kapilt&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://blog.kapilt.com/2008/04/09/12/feed/</wfw:commentRss>
		</item>
		<item>
		<title>developer&#8217;s creed</title>
		<link>http://blog.kapilt.com/2008/01/15/developers-creed/</link>
		<comments>http://blog.kapilt.com/2008/01/15/developers-creed/#comments</comments>
		<pubDate>Tue, 15 Jan 2008 20:18:00 +0000</pubDate>
		<dc:creator>kapilt</dc:creator>
		
		<category><![CDATA[dev-random]]></category>

		<guid isPermaLink="false">http://kapilt.wordpress.com/2008/01/15/developers-creed/</guid>
		<description><![CDATA[“I must create a system or be enslaved by another man’s; I will not reason and compare: my business is to create.”
- William Blake
       ]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>“I must create a system or be enslaved by another man’s; I will not reason and compare: my business is to create.”</p>
<p>- William Blake</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/kapilt.wordpress.com/8/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/kapilt.wordpress.com/8/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/kapilt.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/kapilt.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/kapilt.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/kapilt.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/kapilt.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/kapilt.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/kapilt.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/kapilt.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/kapilt.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/kapilt.wordpress.com/8/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.kapilt.com&blog=785435&post=8&subd=kapilt&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://blog.kapilt.com/2008/01/15/developers-creed/feed/</wfw:commentRss>
		</item>
		<item>
		<title>In search of an editor/IDE</title>
		<link>http://blog.kapilt.com/2008/01/15/in-search-of-an-editoride/</link>
		<comments>http://blog.kapilt.com/2008/01/15/in-search-of-an-editoride/#comments</comments>
		<pubDate>Tue, 15 Jan 2008 15:08:00 +0000</pubDate>
		<dc:creator>kapilt</dc:creator>
		
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://kapilt.wordpress.com/2008/01/15/in-search-of-an-editoride/</guid>
		<description><![CDATA[
I&#8217;ve been a long time emacs user, my personal search for better development environments, has taken me across a host of tools, from eclipse, and nano to others. While i&#8217;ll continue to use emacs on occassion. I&#8217;ve finally settled on textmate for my standard development environment.
some editors and ide tools i&#8217;ve used along the way.
Editors
emacs

python-model, [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><div>
<div style="text-align:left;">I&#8217;ve been a long time emacs user, my personal search for better development environments, has taken me across a host of tools, from eclipse, and nano to others. While i&#8217;ll continue to use emacs on occassion. I&#8217;ve finally settled on <a id="imi7" title="textmate" href="http://www.macromates.com">textmate</a> for my standard development environment.</div>
<p>some editors and ide tools i&#8217;ve used along the way.</p>
<h2>Editors</h2>
<p><strong>emacs<br />
</strong><br />
python-model, pdbtrack.el and loads of customizations of have suited me well for years. i have most of the keybindings for it wired into my fingers and reflex memory. it has served me well, in projects from large to small, and i&#8217;ve always come back to it, after trying out other development environments. the ability to drive multiple shells, and all the integration with standard unix development tools make it for me the gold standard. unfortunately, for all of that i&#8217;ve used emacs, i&#8217;m not a hard core emacs user. I&#8217;m not inclined to hack the lisp nesc, or for me to customize the environment on an ongoing basis to adapt to the way i work, because of my percieved cost of customization, which is what has lead me to explore alternatives.<strong></strong></p>
<p><strong></strong><strong> eclipse and pydev </strong></p>
<p><strong></strong> eclipse is a little strange to get into unless your familiar with the eccentricities of the full blown IDE mentality. whereby the ide sucks your code into some &#8216;workspace&#8217;, from wherever you point it to on the filesystem. customization beyond the builtin functionalities, requires programming the system in java.</p>
<p>for development of java projects, its hard to complain. if emacs is the editor os of the 80 and 90s, it seems that eclipse is destined to become the new os for the next 20 years.</p>
<p><strong>wingide</strong></p>
<p>has one of the best source completions and debuggers available for python. unfortunately its tied to the gtk toolkit, which is a great for single platform usage, but i find pales for anything approaching useable on platforms other linux.</p>
<p><strong>eric3</strong></p>
<p>the most comprehensive of the opensource python editors, its user interface has some notion of tossing in every feature under the sun into the user interface simulatenously. some creative editing of the preferences can mitigate this user interface nightmare, into something a bit more manageable. the source itself is fairly clean, owing i think both to good design and the elegance of the qt api.</p>
<div>
<div style="text-align:left;">
<h1><strong>supplemental tools</strong></h1>
</div>
<p>a collection of tools i commonly use when working on projects.</p>
</div>
<p><a id="e60x" title="ipython" href="http://ipython.scipy.org/moin/"><strong>ipython</strong></a></p>
<p>the python shell on steroids, useful tools for tab completion. personally i&#8217;ve typically use a lighter weight cousin of ipython, known as <a id="ptci" title="rlcompleter2 by holger krekel" href="http://codespeak.net/rlcompleter2/">rlcompleter2 by holger krekel</a></p>
<p><a id="ft.3" title="buildout" href="http://pypi.python.org/pypi/zc.buildout/"><strong>buildout</strong></a><br />
<strong><br />
</strong> a tool for creating and managing development and deployments. it allows for management of python eggs, as well as compilation of system environments. <strong></strong></p>
<p><strong></strong><a id="c_" title="ctags" href="http://ctags.sourceforge.net/"><strong>ctags</strong></a><br />
<strong><br />
</strong> a keyword extraction utility, that builds a symbol database for quick look up of symbols in files.<strong></strong></p>
<p><strong></strong><strong>paster</strong></p>
<p><strong> </strong>a set of tools and libraries for wsgi application construction.<strong><br />
</strong></p>
<h3><strong>TextMate</strong></h3>
<div>i&#8217;ve heard about textmate for a while, but strongly resisted the notion of being tied to a propretiary platform specific tool, except its now also clear that its the most productive environment i&#8217;ve worked on because its also the most easy environment to customize and extend that i&#8217;ve seen. eclipse (including ria) and emacs are both probably superior in their overall customization capabilities, but the ease of doing customization in textmate without programming surpasses them both.</p>
<p>i wanted to get together a blog entry and collect some ideas on things for extensions on textmate to help me being productive in a python/zope3/plone environment. There is an existing Zope.tmBundle from the collective which i&#8217;ve used as a starting point. Its got some good features.</p>
<p>some ideas</p>
<p>- command results dialog<br />
- buildout parts executor dialog<br />
- class browser<br />
- prefix based file search dialog<br />
- needs a corresponding buildout part<br />
- some of the more advanced would require running a code daemon synchronous to the project. something to index the code/symbols, run tests,<br />
- indexed symbol search<br />
- find search<br />
- wrap code for post mortem debugging (done)<br />
- restructured text mode<br />
- automatically run pyflakes when saving python<br />
- open zcml file<br />
- open import definition</p>
<p>prefix based file search dialog</p>
<div style="text-align:left;">for indexed file search we need a per project corresponding data structure. let&#8217;s say etags.<br />
it would needs a corresponding buildout part, to index the source.</p>
<p>ctags based completion<br />
- found this one in the textmate svn bundles, required for zope developers</p>
</div>
<p>textmate restructured text mode<br />
- also in the textmate svn bundles</p>
</div>
</div>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/kapilt.wordpress.com/7/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/kapilt.wordpress.com/7/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/kapilt.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/kapilt.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/kapilt.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/kapilt.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/kapilt.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/kapilt.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/kapilt.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/kapilt.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/kapilt.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/kapilt.wordpress.com/7/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.kapilt.com&blog=785435&post=7&subd=kapilt&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://blog.kapilt.com/2008/01/15/in-search-of-an-editoride/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>