<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Rounder Wheels</title>
	<atom:link href="http://schettino72.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://schettino72.wordpress.com</link>
	<description>on programming</description>
	<lastBuildDate>Thu, 10 Nov 2011 10:55:02 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='schettino72.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Rounder Wheels</title>
		<link>http://schettino72.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://schettino72.wordpress.com/osd.xml" title="Rounder Wheels" />
	<atom:link rel='hub' href='http://schettino72.wordpress.com/?pushpress=hub'/>
		<item>
		<title>A faster (but incomplete) implementation of SCons on top of doit</title>
		<link>http://schettino72.wordpress.com/2011/07/19/faster-scons-on-top-of-doit/</link>
		<comments>http://schettino72.wordpress.com/2011/07/19/faster-scons-on-top-of-doit/#comments</comments>
		<pubDate>Tue, 19 Jul 2011 05:22:00 +0000</pubDate>
		<dc:creator>schettino72</dc:creator>
				<category><![CDATA[doit]]></category>
		<category><![CDATA[build-tool]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[scons]]></category>

		<guid isPermaLink="false">http://schettino72.wordpress.com/?p=115</guid>
		<description><![CDATA[Motivation doit is an automation tool. It is kind of build-tool but more generic&#8230; My motivation was to demonstrate how to create a specialized interface for defining tasks. doit can be used for many different purposes, so its default interface can be quite verbose if compared to tools created to solve one specific problem. Instead of creating an [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=schettino72.wordpress.com&amp;blog=1814650&amp;post=115&amp;subd=schettino72&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h2>Motivation</h2>
<p><em><a title="doit" href="http://python-doit.sourceforge.net/">doit</a></em> is an automation tool. It is kind of build-tool but more generic&#8230;</p>
<p>My motivation was to demonstrate how to create a specialized interface for defining tasks. <em>doit</em> can be used for many different purposes, so its default interface can be quite verbose if compared to tools created to solve one specific problem.</p>
<p>Instead of creating an interface myself I decided to use an existing interface. I picked <em><a href="http://www.scons.org">SCons</a></em>. So the goal was to be able to build C/C++ project using an existing SConstruct file without any modification. And of course it should be as good as SCons on dependency tracking, ensuring always a correct result.</p>
<p>A secondary goal was to make it fast.</p>
<p>Note that this implementation is very far from complete. I only implemented the bare minimum to get some benchmarks running.</p>
<h2>Implementation</h2>
<p>I wont go into the gory details&#8230; Just a few notes. You can check the code <a href="https://bitbucket.org/schettino72/doit-recipes/src/tip/docons/">here</a>.</p>
<p>In <em>docons.py</em> there is an implementation of the API available in SConstrcut files. When a &#8220;<a href="http://www.scons.org/doc/production/HTML/scons-user.html#chap-simple">Builder Method</a>&#8221; (like <em>Program</em> or <em>Object</em>) is executed a reference to the builder is saved in a global variable. These &#8220;Builder Methods&#8221; are actually implemented as class that can generate dictionaries representing <em>doit</em> tasks.</p>
<p>In <em>doit</em> the configuration file that define your tasks is called <em>dodo.py</em>. In this case the end user wont edit this file directly. <em>dodo.py</em> will import the SCons API namespace from docons, than it will <em>execfile </em>the SConstruct file and collect the tasks from the &#8220;Builder Methods&#8221;.</p>
<p>Creating tasks for compile/link is straightforward. The hard part is automatically finding out the dependencies in the source code and mapping it into account on your tasks. To find out the dependencies (the <em>#include</em> for C code) in the source I am using the same C preprocessor as used by SCons.</p>
<p>SCons uses the concept of a &#8220;<a href="http://www.scons.org/doc/production/HTML/scons-user.html#chap-scanners">Scanner</a>&#8221; function associated with a Builder. In <em>doit</em> the implicit dependencies are &#8220;calculated&#8221; in a separate task. The dependencies are than put into the build (compile/link) tasks through <a href="http://python-doit.sourceforge.net/dependencies.html#calculated-dependencies">calc_dep</a> (calculated dependencies).</p>
<h2></h2>
<h2>A faster implementation</h2>
<p>It seems <em>SCons</em> creates the whole dependency graph before starting to execute the tasks/builders. Because of this it doesn&#8217;t scale so well when the number of files increase.</p>
<p><em>doit</em> creates the dependency graph dynamically during task execution. But even on a no-op build it will end-up with a complete graph built because it will check all tasks dependencies.</p>
<p><em><a href="http://gittup.org/tup/">tup</a></em> is a build-tool that saves the dependency graph in a SQLite database. I decided to give it a try to its approach.  So I created &#8220;<em>dup&#8221;</em> &#8211; sorry for the name :) . It will still read the build configuration from SConstrcut files but it will keep a SQLite database mapping the targets to all of its dependencies. This enables a much faster no-op and incremental builds. The  underlying graph dependency of a target will only be built if required.</p>
<h2></h2>
<h2>Benchmarks</h2>
<p>I did some very basic benchmarks from SCons and my two SCons implementations. The benchmarks were created using the <em>gen-bench</em> from <a href="http://www.retropaganda.info/~bohan/work/sf/psycle/branches/bohan/wonderbuild/benchmarks/time.xml">wonderbuild benchmarks</a>.</p>
<p>I used gen-bench script was run with the arguments &#8220;50 100 15 5&#8243;.  This generates 10000 tiny interdependent C++ source and header files, to be built into 50 static libs.</p>
<p>All benchmarks were run on a intel i3 550 quad-core (3.20GHz), running Ubuntu 10.10, python2.6.6, <em>doit</em> 0.13.0, <em>SCons</em> 2.0.0. All benchmarks were run using a single process.</p>
<p><a href="http://schettino72.files.wordpress.com/2011/07/scons_doit_benchmark1.png"><img class="alignnone size-full wp-image-125" title="scons_doit_benchmark" src="http://schettino72.files.wordpress.com/2011/07/scons_doit_benchmark1.png?w=510&#038;h=315" alt="" width="510" height="315" /></a></p>
<p>The graph doesn&#8217;t include full build time. It was SCons=266 seconds, docons=249 seconds, dup=253 seconds.</p>
<ul>
<li>no-op 1 lib -&gt; no-operation build when all files are up-to-date and only one of the 50 libraries were selected to be built (<em>scons build-scons/lib_0/lib0.a</em>)</li>
<li>no-op -&gt; no-operation build</li>
<li>partial build &#8211; cpp file -&gt; only the file <em>lib_1/class_0.cpp</em> was modified. rebuilt 1 object file and 1 lib.</li>
<li>partial build &#8211; hpp file -&gt; only the file <em>lib_0/class_0.hpp</em> was modified. rebuild 30 object files and 14 libs.</li>
</ul>
<p>Analysis</p>
<ol>
<li>comparing <em>SCons</em> and <em>docons</em> on no-op build you can see how doit is considerably faster than <em>SCons</em> on creating the dependency graph and checking what to build.</li>
<li>comparing &#8220;no-op 1 lib&#8221; with &#8220;no-op&#8221; you can see how both <em>SCons</em> and <em>docons</em> have a performance degradation from creating the dependency graph (5.2 and 3.6 times slower respectivelly). And how <em>dup</em> shows little influence on no-op build relative to the size of the dependency graph.</li>
<li>all 3 solutions have almost no difference between a no-op build and a partial/incremental build where a single source file is modified.</li>
<li>as the number of built objects increase the advantage of <em>dup</em> over <em>docons</em> is reduced because it requires the dependency graph from the affected tasks to be built.</li>
</ol>
<h2>Should you stop using SCons?</h2>
<p>Probably not. The implementation is very incomplete and probably buggy in many ways. This code was written just as proof-of-concept (and for fun) to check how powerful, flexible and fast <em>doit</em> can be.</p>
<p>I have personally no interest in developing a C/C++ build tool and if I would build one I would create a different interface from the one used by SCons.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/schettino72.wordpress.com/115/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/schettino72.wordpress.com/115/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/schettino72.wordpress.com/115/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/schettino72.wordpress.com/115/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/schettino72.wordpress.com/115/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/schettino72.wordpress.com/115/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/schettino72.wordpress.com/115/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/schettino72.wordpress.com/115/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/schettino72.wordpress.com/115/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/schettino72.wordpress.com/115/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/schettino72.wordpress.com/115/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/schettino72.wordpress.com/115/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/schettino72.wordpress.com/115/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/schettino72.wordpress.com/115/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=schettino72.wordpress.com&amp;blog=1814650&amp;post=115&amp;subd=schettino72&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://schettino72.wordpress.com/2011/07/19/faster-scons-on-top-of-doit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/88d576a18ff960e17787020cb9b791f7?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">schettino72</media:title>
		</media:content>

		<media:content url="http://schettino72.files.wordpress.com/2011/07/scons_doit_benchmark1.png" medium="image">
			<media:title type="html">scons_doit_benchmark</media:title>
		</media:content>
	</item>
		<item>
		<title>appengine &amp; virtualenv</title>
		<link>http://schettino72.wordpress.com/2010/11/21/appengine-virtualenv/</link>
		<comments>http://schettino72.wordpress.com/2010/11/21/appengine-virtualenv/#comments</comments>
		<pubDate>Sun, 21 Nov 2010 15:48:48 +0000</pubDate>
		<dc:creator>schettino72</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[appengine]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[virtualenv]]></category>

		<guid isPermaLink="false">http://schettino72.wordpress.com/?p=106</guid>
		<description><![CDATA[UPDATE: includes fix for virtualenv 1.5.2 UPDATE2: includes fix for appengine 1.6.0 This article will explain how to setup Google AppEngine (GAE) with virtualenv. GAE does not provide a &#8220;setup.py&#8221; to make the SDK &#8220;installable&#8221;, it is supposed to be used from a folder without being &#8220;installed&#8221;. GAE actually forbids the use of any python [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=schettino72.wordpress.com&amp;blog=1814650&amp;post=106&amp;subd=schettino72&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>UPDATE</strong>: includes fix for virtualenv 1.5.2</p>
<p><strong>UPDATE2</strong>: includes fix for appengine 1.6.0</p>
<p>This article will explain how to setup Google AppEngine (GAE) with virtualenv.</p>
<p>GAE does not provide a &#8220;setup.py&#8221; to make the SDK &#8220;installable&#8221;, it is supposed to be used from a folder without being &#8220;installed&#8221;. GAE actually forbids the use of any python library in the <em>site-packages</em> folder. All included libraries must be in the same folder as your application, this allows GAE to automatically find and upload third-party libraries together with your application code when you upload the code to GAE servers.</p>
<p>So what would be the advantages of using of using virtualenv with GAE? The main reason is to have an environment to run unit-tests and functional tests. It will allow us to use the interactive shell to make operations on DB. And it also enforce you are using the correct python version.</p>
<h3>Step 0 &#8211; install App Engine SDK</h3>
<p>As described on official <a href="http://code.google.com/appengine/docs/python/gettingstarted/devenvironment.html">docs</a></p>
<h3>Step 1 &#8211; create and activate a virtualenv</h3>
<p>Same as usual&#8230;</p>
<p><code><br />
$ virtualenv --python python2.5 --no-site-packages gae-env<br />
$ source gae-env/bin/activate<br />
</code></p>
<h3>Step 2 &#8211; add google_appengine path</h3>
<p>Add a file name &#8220;gae.pth&#8221; to the virtualenv site-packages with the path to <em>google_appengine</em>. This way <em>google_appengine</em> will be in <em>sys.path</em> enabling it to be imported by other modules.</p>
<p>You will need to adjust the content of the file according to where you created your virtualenv and google_appengine location. Mine looks like this:</p>
<p><code><br />
$ cat gae-env/lib/python2.5/site-packages/gae.pth<br />
../../../../google_appengine<br />
</code></p>
<p>Simple test to make sure your gae.pth is correct:<br />
<code><br />
(gae-env)$ python<br />
&gt;&gt;&gt; from google import appengine<br />
</code></p>
<p>If you did not get any exception you are good to go on.</p>
<h3>Step 3 &#8211; fix path for third-party libs</h3>
<p>The AppEngine SDK comes with a few third-party libraries. They are not in the same path as google&#8217;s libraries. If you look at dev_appserver.py you will see a function called <em>fix_sys_path</em>, this function adds the path of the third-party libraries to python&#8217;s sys.path. One option would be to add these paths to gae.pth&#8230; But I prefer to use the function <em>fix_sys_path</em> so we have less chances of having problems with future releases of the SDK.</p>
<p>Python automatically imports the module <em>site.py</em> when a Python interpreter is executed. It can be used to add some site specific code to executed. So we need to add the following lines at the bottom of the <em>main</em> function.</p>
<p><em>site.py</em> is located at:</p>
<p><code><br />
gae-env/lib/python2.5/site.py<br />
</code></p>
<p><code><br />
from dev_appserver import fix_sys_path<br />
fix_sys_path()<br />
</code></p>
<p>Check if it is working fine:</p>
<p><code><br />
(gae-env)$ python<br />
&gt;&gt;&gt; import yaml<br />
</code></p>
<p>Again. You should not any exceptions on this&#8230;</p>
<h3>Step 4 &#8211; add lib folder to FakeFile.ALLOWED_DIRS</h3>
<p>This is only required if you are using virtualenv 1.5.2.</p>
<p>GAE imports the <em>os</em> module and add its path to ALLOWED_DIRS. It will also add the original file folder if the module is a link. virtualenv adds a link from your venv lib/python2.5/os.py to the system lib/python2.5 (i.e. /usr/lib/python2.5). When GAE imports <em>os</em> it is actually using the file os.pyc. On virtualenv 1.5.2 pyc files are not linked anymore so you will probably get an error like &#8220;ImportError: No module named cgi&#8221; when you try to access a page from your GAE application.</p>
<p>To fix this will also use the &#8220;cgi&#8221; module file locations, since it is not linked by virtualenv. (For appengine &lt; 1.6.0) Edit <strong>google_appengine/google/appengine/tools/dev_appserver.py</strong> , edit the class<strong> FakeFile</strong> class attribute <strong>ALLOWED_DIRS</strong>. It should look like this:</p>
<p><strong>UPDATE2</strong>: appengine 1.6.0 the edit <strong>google_appengine/google/appengine/tools/dev_appserver_import_hook.py</strong> . You alse need to &#8220;import cgi&#8221; in the top of the file.</p>
<p><code><br />
ALLOWED_DIRS = set([<br />
os.path.normcase(os.path.realpath(os.path.dirname(os.__file__))),<br />
os.path.normcase(os.path.abspath(os.path.dirname(os.__file__))),<br />
os.path.normcase(os.path.dirname(os.path.realpath(os.__file__))),<br />
os.path.normcase(os.path.dirname(os.path.abspath(os.__file__))),<br />
# required when using virtualenv<br />
# cgi is on system python folder /usr/lib/python2.5/cgi.py<br />
# os is on virtualenv python folder '/path/to/virtualenv/lib/python2.5'])<br />
os.path.normcase(os.path.realpath(os.path.dirname(cgi.__file__))),<br />
os.path.normcase(os.path.abspath(os.path.dirname(cgi.__file__))),<br />
os.path.normcase(os.path.dirname(os.path.realpath(cgi.__file__))),<br />
os.path.normcase(os.path.dirname(os.path.abspath(cgi.__file__))),<br />
])</code></p>
<p><strong>UPDATE</strong>: I guess this wont be necessary when they fix the <a href="http://code.google.com/p/googleappengine/issues/detail?id=4339">issue 4339</a></p>
<h3>Step 5 &#8211; add dev_appserver.py to bin</h3>
<p>Not really required but handy.</p>
<p><code><br />
gae-env/bin $ ln -s ../../google_appengine/dev_appserver.py .<br />
</code></p>
<h3>Conclusion</h3>
<p>Now you have an isolated environment running AppEngine! But pay attention libraries used your production code should not be installed in your virtualenv, you should do &#8220;GAE way&#8221; and link them from your application folder. You should install on virtualenv only stuff used on your tests.</p>
<p>On my next post I will cover how to access the datastore from the interactive prompt and how to write tests using <a href="http://pytest.org/">py.test</a> and <a href="http://pythonpaste.org/webtest/">webtest</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/schettino72.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/schettino72.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/schettino72.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/schettino72.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/schettino72.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/schettino72.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/schettino72.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/schettino72.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/schettino72.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/schettino72.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/schettino72.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/schettino72.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/schettino72.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/schettino72.wordpress.com/106/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=schettino72.wordpress.com&amp;blog=1814650&amp;post=106&amp;subd=schettino72&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://schettino72.wordpress.com/2010/11/21/appengine-virtualenv/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/88d576a18ff960e17787020cb9b791f7?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">schettino72</media:title>
		</media:content>
	</item>
		<item>
		<title>doit slides (pycon asia-pacific 2010)</title>
		<link>http://schettino72.wordpress.com/2010/06/29/doit-slides-pycon-asia-pacific-2010/</link>
		<comments>http://schettino72.wordpress.com/2010/06/29/doit-slides-pycon-asia-pacific-2010/#comments</comments>
		<pubDate>Tue, 29 Jun 2010 14:00:07 +0000</pubDate>
		<dc:creator>schettino72</dc:creator>
				<category><![CDATA[doit]]></category>
		<category><![CDATA[pycon]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://schettino72.wordpress.com/?p=99</guid>
		<description><![CDATA[Here are the slides of my doit presentation at pycon apac 2010<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=schettino72.wordpress.com&amp;blog=1814650&amp;post=99&amp;subd=schettino72&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Here are the slides of my <strong><a href="http://python-doit.sourceforge.net/">doit</a></strong> presentation at <a href="http://pycon.sit.rp.sg/conference-1">pycon apac 2010</a></p>
<iframe src='http://www.slideshare.net/slideshow/embed_code/4641997' width='510' height='418'></iframe>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/schettino72.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/schettino72.wordpress.com/99/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/schettino72.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/schettino72.wordpress.com/99/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/schettino72.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/schettino72.wordpress.com/99/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/schettino72.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/schettino72.wordpress.com/99/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/schettino72.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/schettino72.wordpress.com/99/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/schettino72.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/schettino72.wordpress.com/99/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/schettino72.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/schettino72.wordpress.com/99/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=schettino72.wordpress.com&amp;blog=1814650&amp;post=99&amp;subd=schettino72&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://schettino72.wordpress.com/2010/06/29/doit-slides-pycon-asia-pacific-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/88d576a18ff960e17787020cb9b791f7?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">schettino72</media:title>
		</media:content>
	</item>
		<item>
		<title>doit @ Asia-Pacific pycon</title>
		<link>http://schettino72.wordpress.com/2010/05/16/doit-asia-pacific-pycon/</link>
		<comments>http://schettino72.wordpress.com/2010/05/16/doit-asia-pacific-pycon/#comments</comments>
		<pubDate>Sun, 16 May 2010 16:16:21 +0000</pubDate>
		<dc:creator>schettino72</dc:creator>
				<category><![CDATA[doit]]></category>
		<category><![CDATA[pycon]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://schettino72.wordpress.com/?p=93</guid>
		<description><![CDATA[The first Asia-pacific pycon will be on 9 &#8211; 11 June 2010 in Singapore. I will give a presentation on doit&#8230; So see you in singapure ;)<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=schettino72.wordpress.com&amp;blog=1814650&amp;post=93&amp;subd=schettino72&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The first Asia-pacific <a href="http://pycon.sit.rp.sg/">pycon</a> will be on 9 &#8211; 11 June 2010 in Singapore. I will give a presentation on <a href="http://python-doit.sourceforge.net/"><strong>doit</strong></a>&#8230; </p>
<p>So see you in singapure ;)</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/schettino72.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/schettino72.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/schettino72.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/schettino72.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/schettino72.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/schettino72.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/schettino72.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/schettino72.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/schettino72.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/schettino72.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/schettino72.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/schettino72.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/schettino72.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/schettino72.wordpress.com/93/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=schettino72.wordpress.com&amp;blog=1814650&amp;post=93&amp;subd=schettino72&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://schettino72.wordpress.com/2010/05/16/doit-asia-pacific-pycon/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/88d576a18ff960e17787020cb9b791f7?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">schettino72</media:title>
		</media:content>
	</item>
		<item>
		<title>Slide presentations in reStructuredText -&gt; S5 -&gt; PDF</title>
		<link>http://schettino72.wordpress.com/2010/03/16/slide-presentations-in-restructuredtext-s5-pdf/</link>
		<comments>http://schettino72.wordpress.com/2010/03/16/slide-presentations-in-restructuredtext-s5-pdf/#comments</comments>
		<pubDate>Tue, 16 Mar 2010 15:20:58 +0000</pubDate>
		<dc:creator>schettino72</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[pdf]]></category>
		<category><![CDATA[presentation]]></category>
		<category><![CDATA[reStructuredText]]></category>
		<category><![CDATA[s5]]></category>
		<category><![CDATA[slide]]></category>

		<guid isPermaLink="false">http://schettino72.wordpress.com/?p=85</guid>
		<description><![CDATA[Let&#8217;s say you want to create a slide presentation and you are not very much into presentation software. S5 is a good enough HTML based alternative for a slideshow presentation. reStructuredText and rst2s5 can free you from writing HTML yourself&#8230; S5 can generate a &#34;printer-friendly&#34; version of your slides. But I was really missing a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=schettino72.wordpress.com&amp;blog=1814650&amp;post=85&amp;subd=schettino72&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div class="document" id="slide-presentations-in-restructuredtext-s5-pdf">
<p>Let&#8217;s say you want to create a slide presentation and you are not very much into presentation software.</p>
<p><a class="reference external" href="http://meyerweb.com/eric/tools/s5/">S5</a> is a good enough HTML based alternative for a slideshow presentation. <a class="reference external" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> and <a class="reference external" href="http://docutils.sourceforge.net/docs/user/slide-shows.html">rst2s5</a> can free you from writing HTML yourself&#8230;</p>
<p>S5 can generate a &quot;printer-friendly&quot; version of your slides. But I was really missing a way to create a PDF version of my slides to ease its distribution. I finally found a tool that could handle that <a class="reference external" href="http://www.princexml.com/">Prince</a>.</p>
<p>Example (slides.rst):</p>
<pre class="literal-block">
.. include:: &lt;s5defs.txt&gt;

======================================================================
reStructuredText to PDF
======================================================================

in 2 easy steps

:Author: Eduardo Schettino

(1) rst2s5
=======================

rst =&gt; s5

::

  rst2s5 --theme=small-white slides.rst slides.html

(2) prince
=======================

s5 =&gt; PDF

::

  prince --media projection -s page.css slides.html -o slides.pdf
</pre>
<p>Where <cite>page.css</cite> controls the PDF page size:</p>
<pre class="literal-block">
&#64;page { size: 1280px 800px }
</pre>
<div class="section" id="caveats">
<h1>Caveats</h1>
<ul class="simple">
<li>Prince is not OpenSource though it provides a free license for non-commercial user.</li>
<li>Page footer is displayed only on first page.</li>
<li>Some CSS tweaking might be necessary depending on your theme.</li>
</ul>
</div>
</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/schettino72.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/schettino72.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/schettino72.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/schettino72.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/schettino72.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/schettino72.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/schettino72.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/schettino72.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/schettino72.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/schettino72.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/schettino72.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/schettino72.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/schettino72.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/schettino72.wordpress.com/85/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=schettino72.wordpress.com&amp;blog=1814650&amp;post=85&amp;subd=schettino72&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://schettino72.wordpress.com/2010/03/16/slide-presentations-in-restructuredtext-s5-pdf/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/88d576a18ff960e17787020cb9b791f7?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">schettino72</media:title>
		</media:content>
	</item>
	</channel>
</rss>
