<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;A0UCRX05cCp7ImA9WhVVFUw.&quot;"><id>tag:blogger.com,1999:blog-462006525194985726</id><updated>2012-05-09T01:21:04.328+02:00</updated><category term="matplotlib" /><category term="logging" /><category term="Python" /><category term="wiki" /><category term="EuroPython" /><category term="sysadmin" /><category term="Thinkpad" /><category term="lenny" /><category term="lists" /><category term="Project_Euler" /><category term="Mercurial" /><category term="BTS" /><category term="pycon" /><category term="Chromium" /><category term="ppp" /><category term="awk" /><category term="job" /><category term="ep2011" /><category term="git" /><category term="spam" /><category term="strace" /><category term="scooter" /><category term="debhelper" /><category term="scribe" /><category term="backup" /><category term="thrift" /><category term="linux" /><category term="scripting" /><category term="debug" /><category term="LPI" /><category term="google wave" /><category term="MySQL" /><category term="rrd" /><category term="bts-link" /><category term="pycon4" /><category term="Debian" /><category term="php" /><category term="programming" /><category term="Music" /><category term="modem" /><category term="Concert" /><category term="syslog" /><category term="accident" /><category term="Nagios" /><category term="Blogger" /><category term="book" /><category term="Bash scripting" /><category term="RealLife" /><category term="certification" /><category term="OFTC" /><category term="reportbug" /><category term="shani" /><category term="dpatch" /><category term="pbuilder" /><category term="pycon3" /><category term="fun" /><category term="gmail" /><category term="webscraping" /><category term="svn" /><category term="MIA" /><title>Sandro Tosi</title><subtitle type="html">A blog about things I do: Debian, Linux, Python, whatever</subtitle><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://sandrotosi.blogspot.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://sandrotosi.blogspot.com/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/462006525194985726/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" /><author><name>Sandro Tosi</name><uri>http://www.blogger.com/profile/17077191422205823991</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>88</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/SandroTosi" /><feedburner:info uri="sandrotosi" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry gd:etag="W/&quot;DkAHQ3sycCp7ImA9WhVXFE8.&quot;"><id>tag:blogger.com,1999:blog-462006525194985726.post-4117000034894969533</id><published>2012-04-14T16:42:00.001+02:00</published><updated>2012-04-14T19:32:12.598+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-04-14T19:32:12.598+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Mercurial" /><title>Mercurial: what's the tag containing this changeset?</title><content type="html">In software development, you often need to know: when was this feature released? in which releases was this changeset included?&lt;br /&gt;
&lt;br /&gt;
Typical example is: you're debugging a problem, you find out what's the changeset introducing it, now you want to know when that changeset was firstly released (i.e. included in a tag) - how to do that?&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;hg log -r "&lt;i&gt;cset&lt;/i&gt;:: and tag()"&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
where &lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;cset&lt;/span&gt; is the changeset you're looking for.&lt;br /&gt;
&lt;br /&gt;
So know I know that &lt;a href="http://sphinx.pocoo.org/"&gt;Sphinx&lt;/a&gt; &lt;a href="https://bitbucket.org/birkenfeld/sphinx/issue/322/improve-search-responsiveness"&gt;new way to load searchindex.js&lt;/a&gt; was introduced in the &lt;a href="https://bitbucket.org/birkenfeld/sphinx/changeset/423faa03c908"&gt;this&lt;/a&gt; changeset, and released for the first time in 1.0b2:&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;$ hg log -r "423faa03c908:: and tag()"&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;changeset: &amp;nbsp; 2261:b494009dccf1&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;tag: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1.0b2&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;user: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Georg Brandl &amp;lt;georg@python.org&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;date: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Sun May 30 19:52:08 2010 +0200&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;summary: &amp;nbsp; &amp;nbsp; Release preparation for 1.0b2.&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;...&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
awesome!&lt;br /&gt;
&lt;br /&gt;
PS: why did I need to know that? because &lt;a href="http://matplotlib.sourceforge.net/"&gt;Matplotlib&lt;/a&gt; is &lt;a href="https://github.com/matplotlib/matplotlib/issues/820"&gt;still using&lt;/a&gt; the old way, but Debian &lt;a href="http://anonscm.debian.org/viewvc/python-modules/packages/matplotlib/trunk/debian/patches/60_new_syntax_to_load_searchindex.patch?revision=21105&amp;amp;view=markup"&gt;needs&lt;/a&gt; the new one.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/462006525194985726-4117000034894969533?l=sandrotosi.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/h9S6P-Fq-BqS2vgg4YIX_uuj8I0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/h9S6P-Fq-BqS2vgg4YIX_uuj8I0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/h9S6P-Fq-BqS2vgg4YIX_uuj8I0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/h9S6P-Fq-BqS2vgg4YIX_uuj8I0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/SandroTosi/~4/XeK8-G0kQMg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://sandrotosi.blogspot.com/feeds/4117000034894969533/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=462006525194985726&amp;postID=4117000034894969533" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/462006525194985726/posts/default/4117000034894969533?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/462006525194985726/posts/default/4117000034894969533?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SandroTosi/~3/XeK8-G0kQMg/mercurial-whats-tag-containing-this.html" title="Mercurial: what's the tag containing this changeset?" /><author><name>Sandro Tosi</name><uri>http://www.blogger.com/profile/13017373086527472437</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://sandrotosi.blogspot.com/2012/04/mercurial-whats-tag-containing-this.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0cMQXo7fyp7ImA9WhRRF0g.&quot;"><id>tag:blogger.com,1999:blog-462006525194985726.post-3132474612903907886</id><published>2011-12-01T16:58:00.000+01:00</published><updated>2011-12-01T16:58:00.407+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-12-01T16:58:00.407+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="awk" /><category scheme="http://www.blogger.com/atom/ns#" term="scripting" /><title>Get the lines unique on the first field(s)</title><content type="html">&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;uniq&lt;/span&gt; is a great tool, since it returns the unique (adjacent) lines of the given input. But it has a limitation: it can't check for uniqueness only the first N fields (while it allows to &lt;i&gt;ignore&lt;/i&gt; them, weird).&lt;br /&gt;
&lt;br /&gt;
So, what to do if you have a long file, and lines with several fields, but you're only interested in getting the line with the different first 2 field (but all the rest of the line content? &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;awk&lt;/span&gt; to the&amp;nbsp;rescue!&lt;br /&gt;
&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;$ awk '!x[$1]++' file&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
will print the (complete) lines of &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;file&lt;/span&gt; that has the first field unique. You can set &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;$1$2&lt;/span&gt; to have lines unique on the first 2 fields, and so on. Thanks to this forum &lt;a href="http://www.unix.com/unix-dummies-questions-answers/49649-uniq-using-only-first-field.html#post302158457"&gt;post&lt;/a&gt;, but there's &lt;a href="http://stackoverflow.com/questions/5123820/removing-lines-containing-a-unique-first-field-with-awk"&gt;some&lt;/a&gt; &lt;a href="http://stackoverflow.com/questions/7602174/how-to-only-print-lines-with-unique-fields"&gt;other&lt;/a&gt; interesting articles.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/462006525194985726-3132474612903907886?l=sandrotosi.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/FdPsU-NQZqc86Kf2-NlnEvpRbBY/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/FdPsU-NQZqc86Kf2-NlnEvpRbBY/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/FdPsU-NQZqc86Kf2-NlnEvpRbBY/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/FdPsU-NQZqc86Kf2-NlnEvpRbBY/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/SandroTosi/~4/7t7-y2-Fcd4" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://sandrotosi.blogspot.com/feeds/3132474612903907886/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=462006525194985726&amp;postID=3132474612903907886" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/462006525194985726/posts/default/3132474612903907886?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/462006525194985726/posts/default/3132474612903907886?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SandroTosi/~3/7t7-y2-Fcd4/get-lines-unique-on-first-fields.html" title="Get the lines unique on the first field(s)" /><author><name>Sandro Tosi</name><uri>http://www.blogger.com/profile/17077191422205823991</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://sandrotosi.blogspot.com/2011/12/get-lines-unique-on-first-fields.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0UDQHkycCp7ImA9WhRTE00.&quot;"><id>tag:blogger.com,1999:blog-462006525194985726.post-3664156418817575275</id><published>2011-11-03T09:33:00.003+01:00</published><updated>2011-11-03T09:34:31.798+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-03T09:34:31.798+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="sysadmin" /><category scheme="http://www.blogger.com/atom/ns#" term="scripting" /><title>Trick of today: find -daystart</title><content type="html">What to get the files older than today? Run&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;find /path/ -type f -daystart -mtime +0&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
it will return only the files older than today, no matter the time the command is executed (by default, &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;-mtime&lt;/span&gt;&amp;nbsp;counts multiples of 24 hours from now). Kinda nice when you want to archive yesterday log files.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/462006525194985726-3664156418817575275?l=sandrotosi.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/XmBvOB3XL8SPvW4GUhalEFvo7Ck/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/XmBvOB3XL8SPvW4GUhalEFvo7Ck/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/XmBvOB3XL8SPvW4GUhalEFvo7Ck/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/XmBvOB3XL8SPvW4GUhalEFvo7Ck/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/SandroTosi/~4/3afKA6rKaLE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://sandrotosi.blogspot.com/feeds/3664156418817575275/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=462006525194985726&amp;postID=3664156418817575275" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/462006525194985726/posts/default/3664156418817575275?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/462006525194985726/posts/default/3664156418817575275?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SandroTosi/~3/3afKA6rKaLE/trick-of-today-find-daystart.html" title="Trick of today: find -daystart" /><author><name>Sandro Tosi</name><uri>http://www.blogger.com/profile/17077191422205823991</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://sandrotosi.blogspot.com/2011/11/trick-of-today-find-daystart.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0UNSX47cCp7ImA9WhRTE00.&quot;"><id>tag:blogger.com,1999:blog-462006525194985726.post-3973002062643825548</id><published>2011-09-19T14:46:00.001+02:00</published><updated>2011-11-03T09:34:58.008+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-03T09:34:58.008+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="sysadmin" /><category scheme="http://www.blogger.com/atom/ns#" term="scripting" /><title>Print a NUL-terminated string with awk</title><content type="html">I thought it would have been easier to print a NUL-terminated string in awk (mawk as it's the default in Debian), but after some trial-and-fail I was able to come up with this kinda ugly solution:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;$ echo -e "123\n456" | awk 'BEGIN { ORS="" } { print $0 ; printf("%c", "") }' &amp;nbsp;| xargs -n1 -0 echo&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;123&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;456&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
That:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;set the Output Records Separator (&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;ORS&lt;/span&gt;) to the empty string (default is the &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;\n&lt;/span&gt;, new line)&lt;/li&gt;
&lt;li&gt;print the input line (do your elaboration there, if you need)&lt;/li&gt;
&lt;li&gt;print the null character, as explained in the mawk manpage: "&lt;i&gt;mawk cannot handle ascii NUL \0 in the source or data files. &amp;nbsp;You can output NUL using printf with %c, and any other 8 bit character is acceptable input.&lt;/i&gt;"&lt;/li&gt;
&lt;li&gt;show that it's actually&amp;nbsp;emitting&amp;nbsp;NUL-terminated strings&lt;/li&gt;
&lt;/ul&gt;&lt;div&gt;There's really no better way to do that?&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/462006525194985726-3973002062643825548?l=sandrotosi.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/5pP5GGje5KvRQS3QY8uxBXXheQo/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/5pP5GGje5KvRQS3QY8uxBXXheQo/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/5pP5GGje5KvRQS3QY8uxBXXheQo/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/5pP5GGje5KvRQS3QY8uxBXXheQo/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/SandroTosi/~4/lPRV3Xer_cs" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://sandrotosi.blogspot.com/feeds/3973002062643825548/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=462006525194985726&amp;postID=3973002062643825548" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/462006525194985726/posts/default/3973002062643825548?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/462006525194985726/posts/default/3973002062643825548?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SandroTosi/~3/lPRV3Xer_cs/print-nul-terminated-string-with-awk.html" title="Print a NUL-terminated string with awk" /><author><name>Sandro Tosi</name><uri>http://www.blogger.com/profile/17077191422205823991</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>1</thr:total><feedburner:origLink>http://sandrotosi.blogspot.com/2011/09/print-nul-terminated-string-with-awk.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkcBRH0_cCp7ImA9WhdQEEg.&quot;"><id>tag:blogger.com,1999:blog-462006525194985726.post-5712572446969124360</id><published>2011-08-11T03:53:00.001+02:00</published><updated>2011-08-11T12:20:55.348+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-08-11T12:20:55.348+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Python" /><category scheme="http://www.blogger.com/atom/ns#" term="Mercurial" /><title>Mercurial: how to completely remove a named branch</title><content type="html">I like so much the git feature branch workflow, that in the early days of development on Python with Mercurial I created some named branches; well, that is something you should &lt;b&gt;not&lt;/b&gt; do.&lt;br /&gt;
&lt;br /&gt;
In Mercurial, the changeset contains the branch name, so you cannot develop on a separated (named) branch and then merge on &lt;i&gt;default&lt;/i&gt; and hope that branch goes away, because it will stay.&lt;br /&gt;
&lt;br /&gt;
What do I do now? Python Mercurial repository is quite big (around 200Megs) so I wanted to avoid to re-check it out. Thanks to the help of the folks on &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;#mercurial&lt;/span&gt; (on &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;freenode&lt;/span&gt;&amp;nbsp;IRC network) I found my solution: &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;strip&lt;/span&gt; the branch!&lt;br /&gt;
&lt;br /&gt;
Please note that &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;strip&lt;/span&gt; is &lt;b&gt;dangerous&lt;/b&gt;. Use it only as last resort, and mind you can lose data with it. That said, it's a very powerful tool :) My main aim was to remove completely those named branches, leave no&amp;nbsp;traces, and lose the changes I made on them. Another important aspect is that I didn't merged those branches on default.&lt;br /&gt;
&lt;br /&gt;
So, how to get rid of a named branch:&lt;br /&gt;
&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;$ hg strip "branch(${BRANCHNAME})"&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
and re-iterate for all the branches you have, that's it. Now, to be completely sure they were removed and no spurious changes are in the repository, you can:&lt;br /&gt;
&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;$ hg pull -u&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;$ hg outgoing&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
and if it says "&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;no changes found&lt;/span&gt;" you're sure that those branches are really gone.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/462006525194985726-5712572446969124360?l=sandrotosi.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/HkchDStdvpntkg0zZ46lqbiJ6-E/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/HkchDStdvpntkg0zZ46lqbiJ6-E/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/HkchDStdvpntkg0zZ46lqbiJ6-E/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/HkchDStdvpntkg0zZ46lqbiJ6-E/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/SandroTosi/~4/5wxBRnxPU_4" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://sandrotosi.blogspot.com/feeds/5712572446969124360/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=462006525194985726&amp;postID=5712572446969124360" title="6 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/462006525194985726/posts/default/5712572446969124360?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/462006525194985726/posts/default/5712572446969124360?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SandroTosi/~3/5wxBRnxPU_4/mercurial-how-to-completely-remove.html" title="Mercurial: how to completely remove a named branch" /><author><name>Sandro Tosi</name><uri>http://www.blogger.com/profile/17077191422205823991</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>6</thr:total><feedburner:origLink>http://sandrotosi.blogspot.com/2011/08/mercurial-how-to-completely-remove.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DE8GQXw8eCp7ImA9WhdREk4.&quot;"><id>tag:blogger.com,1999:blog-462006525194985726.post-6690929231258332780</id><published>2011-08-02T00:13:00.000+02:00</published><updated>2011-08-02T00:13:40.270+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-08-02T00:13:40.270+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Python" /><title>And what am I now? A Python Core Developer!</title><content type="html">Yeah, since a couple of hours I'm officially a Python Core Developer (and &lt;a href="http://www.python.org/dev/committers"&gt;this&lt;/a&gt; confirms it, so I'm not dreaming!)&lt;br /&gt;
&lt;br /&gt;
I'm now in that mixed state in between the happiness and the fear I'll do stupid mistakes and I'll be&amp;nbsp;ashamed&amp;nbsp;of myself. But hey, i&lt;i&gt;t's only those who do nothing that make no mistakes&lt;/i&gt;.&lt;br /&gt;
&lt;br /&gt;
Interesting days ahead, a lot of procedures to learn and get used to, hopefully also a lot of bugs fixed :) That's for sure, I'll go step by step, following the &lt;i&gt;better be safe than sorry&lt;/i&gt; rule.&lt;br /&gt;
&lt;br /&gt;
At the end, I'd like to thank all the people at Python that made this possible, they are quite a number, so if I'd named them, I surely forgot someone, and it would be unfair! So well, you know who you are, and this big &lt;b&gt;THANK YOU&lt;/b&gt; is yours :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/462006525194985726-6690929231258332780?l=sandrotosi.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/1mVo3yDWEcHHWjEUCJu5VCRggZg/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/1mVo3yDWEcHHWjEUCJu5VCRggZg/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/1mVo3yDWEcHHWjEUCJu5VCRggZg/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/1mVo3yDWEcHHWjEUCJu5VCRggZg/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/SandroTosi/~4/Cdcis4LXFUE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://sandrotosi.blogspot.com/feeds/6690929231258332780/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=462006525194985726&amp;postID=6690929231258332780" title="5 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/462006525194985726/posts/default/6690929231258332780?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/462006525194985726/posts/default/6690929231258332780?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SandroTosi/~3/Cdcis4LXFUE/and-what-am-i-now-python-core-developer.html" title="And what am I now? A Python Core Developer!" /><author><name>Sandro Tosi</name><uri>http://www.blogger.com/profile/17077191422205823991</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>5</thr:total><feedburner:origLink>http://sandrotosi.blogspot.com/2011/08/and-what-am-i-now-python-core-developer.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CU8GQn09eSp7ImA9WhZbEU8.&quot;"><id>tag:blogger.com,1999:blog-462006525194985726.post-2439541955194340077</id><published>2011-06-15T09:43:00.000+02:00</published><updated>2011-06-15T09:43:43.361+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-06-15T09:43:43.361+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Bash scripting" /><title>Read multiple variables from stdin in a bash script</title><content type="html">I procrastinated to look up this for such a long time.. today was enough. What I want to achieve is reading a line from stdin and split it among several variables, naively I'd do:&lt;br /&gt;
&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;$ echo "A BB CCC" | read a b c&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;$ echo $a $b $c&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
(no output.) As well explained &lt;a href="http://www.unixguide.net/unix/bash/E4.shtml"&gt;here&lt;/a&gt; the above code doesn't work, but this one does:&lt;br /&gt;
&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;$ read a b c &amp;lt; &amp;lt;(echo "A BB CCC")&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;$ echo $a $b $c&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;A BB CCC&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
as a hint, &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;lt;(cmds)&lt;/span&gt; is called &lt;a href="http://tldp.org/LDP/abs/html/process-sub.html"&gt;process&amp;nbsp;substitution&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/462006525194985726-2439541955194340077?l=sandrotosi.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/a9nLzwiKmNkHoDfp4QkFFJvpdSU/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/a9nLzwiKmNkHoDfp4QkFFJvpdSU/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/a9nLzwiKmNkHoDfp4QkFFJvpdSU/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/a9nLzwiKmNkHoDfp4QkFFJvpdSU/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/SandroTosi/~4/iL4ZVKCYoVw" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://sandrotosi.blogspot.com/feeds/2439541955194340077/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=462006525194985726&amp;postID=2439541955194340077" title="6 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/462006525194985726/posts/default/2439541955194340077?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/462006525194985726/posts/default/2439541955194340077?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SandroTosi/~3/iL4ZVKCYoVw/read-multiple-variables-from-stdin-in.html" title="Read multiple variables from stdin in a bash script" /><author><name>Sandro Tosi</name><uri>http://www.blogger.com/profile/17077191422205823991</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>6</thr:total><feedburner:origLink>http://sandrotosi.blogspot.com/2011/06/read-multiple-variables-from-stdin-in.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkUASHYycSp7ImA9WhZWF0s.&quot;"><id>tag:blogger.com,1999:blog-462006525194985726.post-3089694413454692746</id><published>2011-05-19T01:10:00.000+02:00</published><updated>2011-05-19T01:10:49.899+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-05-19T01:10:49.899+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="EuroPython" /><category scheme="http://www.blogger.com/atom/ns#" term="ep2011" /><category scheme="http://www.blogger.com/atom/ns#" term="Python" /><title>I'm going to EuroPython 2011</title><content type="html">I just got confirmation my company will sponsor me for EuroPython 2011 (thanks &lt;a href="http://we.register.it/index.html?chglng=eng"&gt;Register.it&lt;/a&gt;), so I'll be able to attend the whole week; a lot of amazing talks and the code sprints in the weekend: this is going to be a great time!&lt;br /&gt;
&lt;br /&gt;
Are you coming?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/462006525194985726-3089694413454692746?l=sandrotosi.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/nC4QfH55fSdXlYeP7YxhFd6FzGE/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/nC4QfH55fSdXlYeP7YxhFd6FzGE/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/nC4QfH55fSdXlYeP7YxhFd6FzGE/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/nC4QfH55fSdXlYeP7YxhFd6FzGE/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/SandroTosi/~4/ZGPF_Rye9ec" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://sandrotosi.blogspot.com/feeds/3089694413454692746/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=462006525194985726&amp;postID=3089694413454692746" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/462006525194985726/posts/default/3089694413454692746?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/462006525194985726/posts/default/3089694413454692746?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SandroTosi/~3/ZGPF_Rye9ec/im-going-to-europython-2011.html" title="I'm going to EuroPython 2011" /><author><name>Sandro Tosi</name><uri>http://www.blogger.com/profile/17077191422205823991</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>2</thr:total><feedburner:origLink>http://sandrotosi.blogspot.com/2011/05/im-going-to-europython-2011.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0QARnc-eSp7ImA9WhZRFU4.&quot;"><id>tag:blogger.com,1999:blog-462006525194985726.post-5795446613476658318</id><published>2011-04-11T16:15:00.000+02:00</published><updated>2011-04-11T16:15:47.951+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-04-11T16:15:47.951+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Python" /><title>Python: group a list in sub-lists of n items</title><content type="html">A long list, and you want to process its items n at a time; easy, but how to split that list in sublists of n elements (except the last one, of course)?&lt;br /&gt;
&lt;br /&gt;
I looked a bit into the stdlib but it doesn't seem to exist anything I could use (oh, did I say I'm still on 2.4?) so I directed my research to Google, and found a nice &lt;a href="http://code.activestate.com/recipes/303060-group-a-list-into-sequential-n-tuples/"&gt;recipe&lt;/a&gt; at &lt;a href="http://code.activestate.com/"&gt;ActiveState&lt;/a&gt;, but it has the problem it discards the last list, if it has less than n items.&lt;br /&gt;
&lt;br /&gt;
Searching again, I got more lucky with &lt;a href="http://countergram.com/python-group-iterator-list-function"&gt;this article&lt;/a&gt;: it's a generator of tuples from a list, splitting every n elements and optionally return the last &lt;i&gt;semi-full&lt;/i&gt; tuple. I&amp;nbsp;slightly&amp;nbsp;modified it to obtain:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="prettyprint"&gt;def group_iter(iterator, n=2):
    """ Given an iterator, it returns sub-lists made of n items
    (except the last that can have len &amp;lt; n)
    inspired by http://countergram.com/python-group-iterator-list-function"""
    accumulator = []
    for item in iterator:
        accumulator.append(item)
        if len(accumulator) == n: # tested as fast as separate counter
            yield accumulator
            accumulator = [] # tested faster than accumulator[:] = []
            # and tested as fast as re-using one list object
    if len(accumulator) != 0:
        yield accumulator
&lt;/pre&gt;&lt;br /&gt;
How would you have done it?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/462006525194985726-5795446613476658318?l=sandrotosi.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/h1YsJ9h6P69dmOhAAyaxEbao7uE/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/h1YsJ9h6P69dmOhAAyaxEbao7uE/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/h1YsJ9h6P69dmOhAAyaxEbao7uE/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/h1YsJ9h6P69dmOhAAyaxEbao7uE/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/SandroTosi/~4/GaLfsJneFKU" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://sandrotosi.blogspot.com/feeds/5795446613476658318/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=462006525194985726&amp;postID=5795446613476658318" title="12 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/462006525194985726/posts/default/5795446613476658318?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/462006525194985726/posts/default/5795446613476658318?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SandroTosi/~3/GaLfsJneFKU/python-group-list-in-sub-lists-of-n.html" title="Python: group a list in sub-lists of n items" /><author><name>Sandro Tosi</name><uri>http://www.blogger.com/profile/17077191422205823991</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>12</thr:total><feedburner:origLink>http://sandrotosi.blogspot.com/2011/04/python-group-list-in-sub-lists-of-n.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEcMSH84cCp7ImA9Wx9aEEg.&quot;"><id>tag:blogger.com,1999:blog-462006525194985726.post-1699129304464741011</id><published>2011-03-02T09:54:00.000+01:00</published><updated>2011-03-02T09:54:49.138+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-03-02T09:54:49.138+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="MySQL" /><title>MySQL master/slave chain</title><content type="html">Have you ever needed to create a MySQL databases replication chain like &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;A-&amp;gt;B-&amp;gt;C&lt;/span&gt; where &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;B&lt;/span&gt; is slave of &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;A&lt;/span&gt; and master of &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;C&lt;/span&gt;? Me neither, until yesterday.&lt;br /&gt;
&lt;br /&gt;
Since it took us about an afternoon to make it works (along with our DBAs, so we're not alone ;)) let's share some knowledge.&lt;br /&gt;
&lt;br /&gt;
A very brief recap of how MySQL &lt;a href="http://dev.mysql.com/doc/refman/5.1/en/replication.html"&gt;replication&lt;/a&gt; works:&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;slave I/O &lt;a href="http://dev.mysql.com/doc/refman/5.0/en/start-slave.html"&gt;thread&lt;/a&gt; connects to the master, gets the new information from the binlog files and stores them in the relay log;&lt;/li&gt;
&lt;li&gt;slave SQL thread reads the relay log and applies the changes to the slave database, &lt;b&gt;without&lt;/b&gt; changing the slave binlog files.&lt;/li&gt;
&lt;/ol&gt;&lt;div&gt;That said, &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;B&lt;/span&gt; replicates correctly from &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;A&lt;/span&gt;, but &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;C&lt;/span&gt; is unable to replicate from &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;B&lt;/span&gt; because &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;B&lt;/span&gt; doesn't change its binlog files with updates coming from &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;A&lt;/span&gt;, because there's no changes done directly on &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;B&lt;/span&gt;.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;In order to make the chain works, you need to add the parameter&amp;nbsp;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;a href="http://dev.mysql.com/doc/refman/5.1/en/replication-options-slave.html#option_mysqld_log-slave-updates"&gt;log-slave-updates&lt;/a&gt;&lt;/span&gt; on &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;B&lt;/span&gt; configuration: that will reply the changes from relay log to binlog, and so &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;C&lt;/span&gt; will see the changes it needs to correctly replicate.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;PS: &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;a href="http://dev.mysql.com/doc/refman/5.1/en/mysqldump.html"&gt;mysqldump&lt;/a&gt;&lt;/span&gt;&amp;nbsp;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;a href="http://dev.mysql.com/doc/refman/5.1/en/mysqldump.html#option_mysqldump_master-data"&gt;--master-data&lt;/a&gt;&lt;/span&gt;&amp;nbsp;(executed on the slave server against the master) would help you set up the correct information for replication.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/462006525194985726-1699129304464741011?l=sandrotosi.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/vEqlBm0sFAekLyAD80peIzXOtzY/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/vEqlBm0sFAekLyAD80peIzXOtzY/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/vEqlBm0sFAekLyAD80peIzXOtzY/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/vEqlBm0sFAekLyAD80peIzXOtzY/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/SandroTosi/~4/0pDC71yhoRg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://sandrotosi.blogspot.com/feeds/1699129304464741011/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=462006525194985726&amp;postID=1699129304464741011" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/462006525194985726/posts/default/1699129304464741011?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/462006525194985726/posts/default/1699129304464741011?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SandroTosi/~3/0pDC71yhoRg/mysql-masterslave-chain.html" title="MySQL master/slave chain" /><author><name>Sandro Tosi</name><uri>http://www.blogger.com/profile/17077191422205823991</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://sandrotosi.blogspot.com/2011/03/mysql-masterslave-chain.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkEGRns5eyp7ImA9Wx9bGEk.&quot;"><id>tag:blogger.com,1999:blog-462006525194985726.post-3145454914039441325</id><published>2011-02-27T22:03:00.000+01:00</published><updated>2011-02-27T22:03:47.523+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-02-27T22:03:47.523+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="shani" /><title>FTWCA Shani</title><content type="html">As you probably &lt;a href="http://sandrotosi.blogspot.com/2010/12/welcome-shani.html"&gt;know&lt;/a&gt;, Shani is our pet hedgehog. We finally managed to setup a &lt;a href="http://shanithehedgehog.blogspot.com/"&gt;blog&lt;/a&gt; just for her (sorry, it's in italian only), and also we uploaded tons of her &lt;a href="https://picasaweb.google.com/matrixhasu"&gt;photos&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
You don't remember her? Here's a cute reminder:&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://lh4.googleusercontent.com/-fksQdEmsdbo/TTx3jmzp66I/AAAAAAAAAS4/Iq0KjemMFas/s1600/DSC01156.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="240" src="https://lh4.googleusercontent.com/-fksQdEmsdbo/TTx3jmzp66I/AAAAAAAAAS4/Iq0KjemMFas/s320/DSC01156.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/462006525194985726-3145454914039441325?l=sandrotosi.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/GKrpNukntQkKO9X12yJnME3bjE0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/GKrpNukntQkKO9X12yJnME3bjE0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/GKrpNukntQkKO9X12yJnME3bjE0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/GKrpNukntQkKO9X12yJnME3bjE0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/SandroTosi/~4/8VD82Ll8dWI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://sandrotosi.blogspot.com/feeds/3145454914039441325/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=462006525194985726&amp;postID=3145454914039441325" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/462006525194985726/posts/default/3145454914039441325?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/462006525194985726/posts/default/3145454914039441325?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SandroTosi/~3/8VD82Ll8dWI/ftwca-shani.html" title="FTWCA Shani" /><author><name>Sandro Tosi</name><uri>http://www.blogger.com/profile/17077191422205823991</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://lh4.googleusercontent.com/-fksQdEmsdbo/TTx3jmzp66I/AAAAAAAAAS4/Iq0KjemMFas/s72-c/DSC01156.JPG" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://sandrotosi.blogspot.com/2011/02/ftwca-shani.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEcFQ345fCp7ImA9Wx9WFUQ.&quot;"><id>tag:blogger.com,1999:blog-462006525194985726.post-5824454450089720625</id><published>2011-01-21T08:40:00.004+01:00</published><updated>2011-01-21T08:46:52.024+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-01-21T08:46:52.024+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="EuroPython" /><category scheme="http://www.blogger.com/atom/ns#" term="pycon" /><category scheme="http://www.blogger.com/atom/ns#" term="Python" /><title>EuroPython 2011 @ Florence, IT - it's coming!</title><content type="html">Just when I was looking for a contact email to ask news about &lt;a href="http://ep2011.europython.eu/"&gt;EuroPython 2011&lt;/a&gt; dates... I noticed they are already there!! June 19 to 26 !&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Book your flights, reserve your vacations, hope to see you all there!&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;PS: this year, &lt;a href="http://www.pycon.it/"&gt;PyCon Italia&lt;/a&gt; joins EuroPython in a single conference - the bigger the funnier&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/462006525194985726-5824454450089720625?l=sandrotosi.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/xqnJg8SKI2rw8MF3jNaq6aV9Y3w/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/xqnJg8SKI2rw8MF3jNaq6aV9Y3w/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/xqnJg8SKI2rw8MF3jNaq6aV9Y3w/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/xqnJg8SKI2rw8MF3jNaq6aV9Y3w/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/SandroTosi/~4/BhfXqN_JOc8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://sandrotosi.blogspot.com/feeds/5824454450089720625/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=462006525194985726&amp;postID=5824454450089720625" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/462006525194985726/posts/default/5824454450089720625?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/462006525194985726/posts/default/5824454450089720625?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SandroTosi/~3/BhfXqN_JOc8/europython-2011-florence-it-its-coming.html" title="EuroPython 2011 @ Florence, IT - it's coming!" /><author><name>Sandro Tosi</name><uri>http://www.blogger.com/profile/17077191422205823991</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://sandrotosi.blogspot.com/2011/01/europython-2011-florence-it-its-coming.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C04BRXw7fyp7ImA9Wx9QFkw.&quot;"><id>tag:blogger.com,1999:blog-462006525194985726.post-1306911074341453229</id><published>2010-12-29T09:37:00.002+01:00</published><updated>2010-12-29T09:39:14.207+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-12-29T09:39:14.207+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Python" /><title>Re: Converting date to epoch</title><content type="html">&lt;a href="http://blog.snow-crash.org/2010/12/converting-date-to-epoch.html"&gt;Alexander&lt;/a&gt;,did you even consider that I might need to convert a date to epoch in a python script? :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/462006525194985726-1306911074341453229?l=sandrotosi.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/rDtLUQ193x1wrqxODm04eHDmkoM/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/rDtLUQ193x1wrqxODm04eHDmkoM/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/rDtLUQ193x1wrqxODm04eHDmkoM/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/rDtLUQ193x1wrqxODm04eHDmkoM/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/SandroTosi/~4/3VofBpkOpAU" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://sandrotosi.blogspot.com/feeds/1306911074341453229/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=462006525194985726&amp;postID=1306911074341453229" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/462006525194985726/posts/default/1306911074341453229?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/462006525194985726/posts/default/1306911074341453229?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SandroTosi/~3/3VofBpkOpAU/re-converting-date-to-epoch.html" title="Re: Converting date to epoch" /><author><name>Sandro Tosi</name><uri>http://www.blogger.com/profile/17077191422205823991</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>2</thr:total><feedburner:origLink>http://sandrotosi.blogspot.com/2010/12/re-converting-date-to-epoch.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkcGSH84fSp7ImA9Wx9QFUo.&quot;"><id>tag:blogger.com,1999:blog-462006525194985726.post-3679796391459271356</id><published>2010-12-28T23:00:00.002+01:00</published><updated>2010-12-28T23:07:09.135+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-12-28T23:07:09.135+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Python" /><title>Convert a date to epoch</title><content type="html">it seems like an easy quest, ain't it? well, it took me far too long to get it done, so let just write it down, so that &lt;i&gt;maybe&lt;/i&gt; I won't forget in 2 seconds:&lt;pre class="prettyprint"&gt;&gt;&gt;&gt; import time&lt;br /&gt;&gt;&gt;&gt; str = '2009-03-04'&lt;br /&gt;&gt;&gt;&gt; format = '%Y-%m-%d'&lt;br /&gt;&gt;&gt;&gt; time.mktime(time.strptime(str, format))&lt;br /&gt;1236121200.0&lt;br /&gt;&gt;&gt;&gt; int(_)&lt;br /&gt;1236121200&lt;br /&gt;&lt;/pre&gt;&lt;div&gt;and here you have your epoch (if you just need seconds, use &lt;span class="Apple-style-span" &gt;int()&lt;/span&gt;).&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/462006525194985726-3679796391459271356?l=sandrotosi.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/OXnY6RL3OTBJ2MMOzDgFkia42W8/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/OXnY6RL3OTBJ2MMOzDgFkia42W8/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/OXnY6RL3OTBJ2MMOzDgFkia42W8/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/OXnY6RL3OTBJ2MMOzDgFkia42W8/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/SandroTosi/~4/BwioJGifh8E" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://sandrotosi.blogspot.com/feeds/3679796391459271356/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=462006525194985726&amp;postID=3679796391459271356" title="6 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/462006525194985726/posts/default/3679796391459271356?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/462006525194985726/posts/default/3679796391459271356?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SandroTosi/~3/BwioJGifh8E/convert-date-to-epoch.html" title="Convert a date to epoch" /><author><name>Sandro Tosi</name><uri>http://www.blogger.com/profile/17077191422205823991</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>6</thr:total><feedburner:origLink>http://sandrotosi.blogspot.com/2010/12/convert-date-to-epoch.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkUFQX86eyp7ImA9Wx9REU0.&quot;"><id>tag:blogger.com,1999:blog-462006525194985726.post-4750212528951858416</id><published>2010-12-11T23:46:00.005+01:00</published><updated>2010-12-11T23:56:50.113+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-12-11T23:56:50.113+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="shani" /><title>Welcome Shani!!</title><content type="html">It's been two weeks since our "family" has a new element: an african hedgehog. Her name is Shani, that means &lt;i&gt;wonder&lt;/i&gt; in swahili.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_VYVH3k3q6t8/TQQAcK59COI/AAAAAAAAAJw/bfoikySUMjQ/s1600/shani1.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 356px; height: 400px;" src="http://4.bp.blogspot.com/_VYVH3k3q6t8/TQQAcK59COI/AAAAAAAAAJw/bfoikySUMjQ/s400/shani1.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5549561124791060706" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_VYVH3k3q6t8/TQQAcvHqF0I/AAAAAAAAAJ4/zFZt4t96_mE/s1600/shani2.png"&gt;&lt;img style="text-align: left;display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; cursor: pointer; width: 400px; height: 291px; " src="http://3.bp.blogspot.com/_VYVH3k3q6t8/TQQAcvHqF0I/AAAAAAAAAJ4/zFZt4t96_mE/s400/shani2.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5549561134512215874" /&gt;&lt;/a&gt;&lt;br /&gt;she is so cute, isn't she?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/462006525194985726-4750212528951858416?l=sandrotosi.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/oET8PFTHZ1XtKDkQcMb5TvzDGdI/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/oET8PFTHZ1XtKDkQcMb5TvzDGdI/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/oET8PFTHZ1XtKDkQcMb5TvzDGdI/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/oET8PFTHZ1XtKDkQcMb5TvzDGdI/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/SandroTosi/~4/MdlG50GT3gk" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://sandrotosi.blogspot.com/feeds/4750212528951858416/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=462006525194985726&amp;postID=4750212528951858416" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/462006525194985726/posts/default/4750212528951858416?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/462006525194985726/posts/default/4750212528951858416?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SandroTosi/~3/MdlG50GT3gk/welcome-shani.html" title="Welcome Shani!!" /><author><name>Sandro Tosi</name><uri>http://www.blogger.com/profile/17077191422205823991</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/_VYVH3k3q6t8/TQQAcK59COI/AAAAAAAAAJw/bfoikySUMjQ/s72-c/shani1.png" height="72" width="72" /><thr:total>3</thr:total><feedburner:origLink>http://sandrotosi.blogspot.com/2010/12/welcome-shani.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkMNSXs-eyp7ImA9Wx9SEko.&quot;"><id>tag:blogger.com,1999:blog-462006525194985726.post-7089574465670754248</id><published>2010-12-01T20:00:00.004+01:00</published><updated>2010-12-02T08:21:38.553+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-12-02T08:21:38.553+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="bts-link" /><category scheme="http://www.blogger.com/atom/ns#" term="Debian" /><title>bts-link has a new home!</title><content type="html">Since (already) several weeks, &lt;a href="http://bts-link.alioth.debian.org/"&gt;bts-link&lt;/a&gt; has a new home: busoni.debian.org! That's one of the machines where &lt;a href="http://bugs.debian.org/"&gt;BTS&lt;/a&gt; is running, and it helps to let bts-link complete its job in about 30 mins each time. Thanks goes to Don Armstrong and Peter Palfrader for their support in the migration (from merkel).&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Once again, let me encourage you to contact the bts-link developers &lt;a href="mailto:bts-link-devel@lists.alioth.debian.org"&gt;mailing-list&lt;/a&gt; to request your project to be added to the tool in case it's not (we usually do some checks and adds from time to time, but if you notify us, you'll get it faster :) ).&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/462006525194985726-7089574465670754248?l=sandrotosi.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/LbZVpXeqFBdqz49Nq8lHtnXHzIs/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/LbZVpXeqFBdqz49Nq8lHtnXHzIs/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/LbZVpXeqFBdqz49Nq8lHtnXHzIs/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/LbZVpXeqFBdqz49Nq8lHtnXHzIs/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/SandroTosi/~4/CqVpwA5THcw" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://sandrotosi.blogspot.com/feeds/7089574465670754248/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=462006525194985726&amp;postID=7089574465670754248" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/462006525194985726/posts/default/7089574465670754248?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/462006525194985726/posts/default/7089574465670754248?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SandroTosi/~3/CqVpwA5THcw/bts-link-has-new-home.html" title="bts-link has a new home!" /><author><name>Sandro Tosi</name><uri>http://www.blogger.com/profile/17077191422205823991</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://sandrotosi.blogspot.com/2010/12/bts-link-has-new-home.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0MDRXcyfyp7ImA9Wx5bGUo.&quot;"><id>tag:blogger.com,1999:blog-462006525194985726.post-4895006379868929934</id><published>2010-11-05T16:27:00.003+01:00</published><updated>2010-11-05T16:37:54.997+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-11-05T16:37:54.997+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="strace" /><category scheme="http://www.blogger.com/atom/ns#" term="linux" /><category scheme="http://www.blogger.com/atom/ns#" term="sysadmin" /><title>"multi-strace"</title><content type="html">Thanks to a colleague, we hereby present the &lt;i&gt;multi-strace&lt;/i&gt;:&lt;div&gt;&lt;blockquote&gt;&lt;span class="Apple-style-span"&gt;strace $(pgrep httpd | awk '{ print "-p " $1 }' | tr '\n' ' ')&lt;/span&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;div&gt;(it's left as exercise to the reader to understand what it does) if you want to save the output and the play with it, just add '&lt;span class="Apple-style-span" &gt;-o &amp;lt;file&amp;gt;&lt;/span&gt;'.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Welcome, new handy tool!&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/462006525194985726-4895006379868929934?l=sandrotosi.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Z_-MJodHpKyaGo_cPT6-z-6-828/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Z_-MJodHpKyaGo_cPT6-z-6-828/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Z_-MJodHpKyaGo_cPT6-z-6-828/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Z_-MJodHpKyaGo_cPT6-z-6-828/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/SandroTosi/~4/zNUnR30ignY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://sandrotosi.blogspot.com/feeds/4895006379868929934/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=462006525194985726&amp;postID=4895006379868929934" title="5 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/462006525194985726/posts/default/4895006379868929934?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/462006525194985726/posts/default/4895006379868929934?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SandroTosi/~3/zNUnR30ignY/multi-strace.html" title="&quot;multi-strace&quot;" /><author><name>Sandro Tosi</name><uri>http://www.blogger.com/profile/17077191422205823991</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>5</thr:total><feedburner:origLink>http://sandrotosi.blogspot.com/2010/11/multi-strace.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0EER3o_cCp7ImA9Wx5UF0g.&quot;"><id>tag:blogger.com,1999:blog-462006525194985726.post-8121152837296738003</id><published>2010-10-22T09:19:00.002+02:00</published><updated>2010-10-22T15:53:26.448+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-10-22T15:53:26.448+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="scribe" /><category scheme="http://www.blogger.com/atom/ns#" term="thrift" /><category scheme="http://www.blogger.com/atom/ns#" term="logging" /><category scheme="http://www.blogger.com/atom/ns#" term="Debian" /><title>Scribe (&amp; thrift) for Debian Squeeze</title><content type="html">Some time ago, I &lt;a href="http://sandrotosi.blogspot.com/2009/12/remote-apache-logging-with-syslog-is.html"&gt;asked&lt;/a&gt; what are the common solutions for services remote logging. It was suggested &lt;a href="http://en.wikipedia.org/wiki/Scribe_(log_server)"&gt;scribe&lt;/a&gt;, an application log server developed at Facebook and later released as an open source project, and we finally managed to get this ready for Debian squeeze.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://github.com/facebook/scribe"&gt;Scribe&lt;/a&gt; requires a couple of other tools to work: &lt;a href="http://incubator.apache.org/thrift/"&gt;thrift&lt;/a&gt;, a framework for services development (born at Facebook too), and &lt;a href="http://svn.apache.org/repos/asf/incubator/thrift/trunk/contrib/fb303/"&gt;thrift-fb303&lt;/a&gt;, a piece of thrift used as a &lt;i&gt;bassline&lt;/i&gt; layer for Facebook services.&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Searching the web for some work-in-progress of a Debian packaging, I found the wonderful work done by SimpleGeo; since I have some changes to do (and also take the occasion to play a bit with github), I forked their repos in these ones: &lt;a href="http://github.com/sandrotosi/scribe"&gt;scribe&lt;/a&gt;, &lt;a href="http://github.com/sandrotosi/thrift"&gt;thrift&lt;/a&gt; and &lt;a href="http://github.com/sandrotosi/thrift-fb303"&gt;thrift-fb303&lt;/a&gt;.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I've prepared a &lt;a href="http://people.debian.org/~morph/thrift-scribe/"&gt;repository&lt;/a&gt; with those 3 packages, if you would like to try scribe, give it a look. They are for squeeze because, well, after all I need it for work and since it requires Python 2.6, using squeeze was the easiest choice (backporting 2.6 to lenny could be a mess, even if there are packages out there) and so I could also see how the upgrade from lenny would be.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Let's now dive into the &lt;a href="http://github.com/facebook/scribe/wiki/"&gt;doc&lt;/a&gt;, and some examples too, to find out the several &lt;a href="http://github.com/facebook/scribe/wiki/Scribe-Configuration"&gt;configuration options&lt;/a&gt; and decide what's best for us.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/462006525194985726-8121152837296738003?l=sandrotosi.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/ldz77YB7Lb54FndlzrDX_vBYjus/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ldz77YB7Lb54FndlzrDX_vBYjus/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/ldz77YB7Lb54FndlzrDX_vBYjus/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ldz77YB7Lb54FndlzrDX_vBYjus/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/SandroTosi/~4/e3HiKhVUnIE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://sandrotosi.blogspot.com/feeds/8121152837296738003/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=462006525194985726&amp;postID=8121152837296738003" title="9 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/462006525194985726/posts/default/8121152837296738003?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/462006525194985726/posts/default/8121152837296738003?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SandroTosi/~3/e3HiKhVUnIE/scribe-thrift-for-debian-squeeze.html" title="Scribe (&amp; thrift) for Debian Squeeze" /><author><name>Sandro Tosi</name><uri>http://www.blogger.com/profile/17077191422205823991</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>9</thr:total><feedburner:origLink>http://sandrotosi.blogspot.com/2010/10/scribe-thrift-for-debian-squeeze.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C04CRXc_eCp7ImA9Wx5UF04.&quot;"><id>tag:blogger.com,1999:blog-462006525194985726.post-8165804918918271817</id><published>2010-10-22T09:04:00.004+02:00</published><updated>2010-10-22T09:19:24.940+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-10-22T09:19:24.940+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Debian" /><category scheme="http://www.blogger.com/atom/ns#" term="Chromium" /><title>URL shortcuts in Chromium</title><content type="html">&lt;div style="text-align: left;"&gt;If you like the Firefox feature to create &lt;a href="http://costela.net/2010/06/re-firefoxiceweaselchromium-smart-bookmarks/"&gt;&lt;i&gt;special bookmarks&lt;/i&gt;&lt;/a&gt; that are actual templates for specific urls, well, here's how I got the same for Chromium.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;That's actually how &lt;a href="http://www.wordreference.com/tools/Chrome-search-shortcut.aspx"&gt;WordReference&lt;/a&gt; is suggesting, so it's defining new search engines: right click on the URL bar, Edit seach engine, and then Add; now you can define what you like, f.e. :&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;img src="http://1.bp.blogspot.com/_VYVH3k3q6t8/TME6oXV0NNI/AAAAAAAAAJo/Mn2aCTyCm28/s400/chromium_pts_se.png" style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 210px;" border="0" alt="" id="BLOGGER_PHOTO_ID_5530766282522375378" /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;and so now typing "&lt;span class="Apple-style-span" &gt;pts package&lt;/span&gt;&lt;package&gt;" in the URL bar you'll get to the package PTS page.&lt;/package&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;That's one of the core points I had to get fixed in order to migrate from FF to chromium, one step closer then.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/462006525194985726-8165804918918271817?l=sandrotosi.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/KgHaFH22OsaawsLPkDKfshdf8JA/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/KgHaFH22OsaawsLPkDKfshdf8JA/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/KgHaFH22OsaawsLPkDKfshdf8JA/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/KgHaFH22OsaawsLPkDKfshdf8JA/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/SandroTosi/~4/AiKzV6T0DYM" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://sandrotosi.blogspot.com/feeds/8165804918918271817/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=462006525194985726&amp;postID=8165804918918271817" title="5 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/462006525194985726/posts/default/8165804918918271817?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/462006525194985726/posts/default/8165804918918271817?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SandroTosi/~3/AiKzV6T0DYM/url-shortcuts-in-chromium.html" title="URL shortcuts in Chromium" /><author><name>Sandro Tosi</name><uri>http://www.blogger.com/profile/17077191422205823991</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_VYVH3k3q6t8/TME6oXV0NNI/AAAAAAAAAJo/Mn2aCTyCm28/s72-c/chromium_pts_se.png" height="72" width="72" /><thr:total>5</thr:total><feedburner:origLink>http://sandrotosi.blogspot.com/2010/10/url-shortcuts-in-chromium.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0MEQn8-cCp7ImA9Wx5UFk0.&quot;"><id>tag:blogger.com,1999:blog-462006525194985726.post-5567419135035664968</id><published>2010-10-20T20:54:00.002+02:00</published><updated>2010-10-20T21:03:23.158+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-10-20T21:03:23.158+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Python" /><title>Feeling welcome: Python, you're doing it right!</title><content type="html">It was for a very long time (I think back from PyconIT 2) that I wanted to contribute to python. About a month and a half ago I started reading all the documentation I could about development processes &amp;amp; workflows, mercurial stuff (I don't have commit right, so I prefer working on a DVCS than on SVN), bugs management and so.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;After all of this, less than month ago I started contributing very small patches; then when looking for "something to do" I found bugs that could be closed, in particular because they were already been fixed, and then last night R. David Murray proposed to give me "tracker privs", that moments after were granted \o/&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;What can I say? Thank you! that's something making me feel like I'm doing something useful to the language I love, and even if the privs are "not that much", it's a sign of trust, which really makes me happy!&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;As of now, I feel like I'm between "better be safe than sorry" and "it's easier to ask forgiveness than permission" mood, but we'll see how it goes.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Python, you're making me feel welcome, and so, once again, thank you!&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/462006525194985726-5567419135035664968?l=sandrotosi.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/C9ZzJTNoqOfXSVnB23E62w01ZfI/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/C9ZzJTNoqOfXSVnB23E62w01ZfI/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/C9ZzJTNoqOfXSVnB23E62w01ZfI/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/C9ZzJTNoqOfXSVnB23E62w01ZfI/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/SandroTosi/~4/u4Rxu8_j3_c" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://sandrotosi.blogspot.com/feeds/5567419135035664968/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=462006525194985726&amp;postID=5567419135035664968" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/462006525194985726/posts/default/5567419135035664968?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/462006525194985726/posts/default/5567419135035664968?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SandroTosi/~3/u4Rxu8_j3_c/feeling-welcome-python-youre-doing-it.html" title="Feeling welcome: Python, you're doing it right!" /><author><name>Sandro Tosi</name><uri>http://www.blogger.com/profile/17077191422205823991</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://sandrotosi.blogspot.com/2010/10/feeling-welcome-python-youre-doing-it.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEYNRH4_eCp7ImA9Wx5XF04.&quot;"><id>tag:blogger.com,1999:blog-462006525194985726.post-6329895588077692996</id><published>2010-09-17T15:53:00.002+02:00</published><updated>2010-09-17T16:03:15.040+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-09-17T16:03:15.040+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Python" /><title>HTTP requests specifying the Host header (in Python)</title><content type="html">Since it took me some time to find this solution, I think it might be worth to share it.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;When you have a web server listening on a single IP address but serving several domains, it's quite common to run:&lt;/div&gt;&lt;pre&gt;$ curl -H "Host: domain" http://ip_address/path/to/the/page.html&lt;/pre&gt;&lt;div&gt;if you need to view that domain directly pointing to the web server (so avoiding any balancers or network "magics" you might have in place).&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Well, the question is: how to do that in Python? I find my answer in the &lt;a href="http://docs.python.org/library/httplib.html"&gt;httplib&lt;/a&gt; module:&lt;/div&gt;&lt;pre class="prettyprint"&gt;import httplib&lt;br /&gt;conn = httplib.HTTPConnection("ip_address")&lt;br /&gt;conn.putrequest("GET", "/", skip_host=True)&lt;br /&gt;conn.putheader("Host", "domain.ext")&lt;br /&gt;conn.endheaders()&lt;br /&gt;res = conn.getresponse()&lt;br /&gt;print res.read()&lt;br /&gt;&lt;/pre&gt;&lt;div&gt;HTH&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/462006525194985726-6329895588077692996?l=sandrotosi.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/TZNJhljkDh_A9Zqj0qYNpSSjgPY/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/TZNJhljkDh_A9Zqj0qYNpSSjgPY/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/TZNJhljkDh_A9Zqj0qYNpSSjgPY/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/TZNJhljkDh_A9Zqj0qYNpSSjgPY/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/SandroTosi/~4/H54P_SDBo54" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://sandrotosi.blogspot.com/feeds/6329895588077692996/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=462006525194985726&amp;postID=6329895588077692996" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/462006525194985726/posts/default/6329895588077692996?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/462006525194985726/posts/default/6329895588077692996?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SandroTosi/~3/H54P_SDBo54/http-requests-specifying-host-header-in.html" title="HTTP requests specifying the Host header (in Python)" /><author><name>Sandro Tosi</name><uri>http://www.blogger.com/profile/17077191422205823991</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>3</thr:total><feedburner:origLink>http://sandrotosi.blogspot.com/2010/09/http-requests-specifying-host-header-in.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEIEQno7eyp7ImA9WxFSF0s.&quot;"><id>tag:blogger.com,1999:blog-462006525194985726.post-4589255535085360429</id><published>2010-04-20T13:20:00.000+02:00</published><updated>2010-04-20T13:21:43.403+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-04-20T13:21:43.403+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="fun" /><title>My nerd score is...</title><content type="html">&lt;a href="http://www.nerdtests.com/ft_nq.php"&gt;&lt;br /&gt;&lt;img src="http://www.nerdtests.com/images/ft/nq/b1ccbdb62e.gif" alt="I am nerdier than 99% of all people. Are you a nerd? Click here to take the Nerd Test, get nerdy images and jokes, and talk on the nerd forum!" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;oh my...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/462006525194985726-4589255535085360429?l=sandrotosi.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/czYgrnzgP8fnW6Uwhh3IpPKDONc/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/czYgrnzgP8fnW6Uwhh3IpPKDONc/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/czYgrnzgP8fnW6Uwhh3IpPKDONc/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/czYgrnzgP8fnW6Uwhh3IpPKDONc/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/SandroTosi/~4/C17lzdgk9XU" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://sandrotosi.blogspot.com/feeds/4589255535085360429/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=462006525194985726&amp;postID=4589255535085360429" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/462006525194985726/posts/default/4589255535085360429?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/462006525194985726/posts/default/4589255535085360429?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SandroTosi/~3/C17lzdgk9XU/my-nerd-score-is.html" title="My nerd score is..." /><author><name>Sandro Tosi</name><uri>http://www.blogger.com/profile/17077191422205823991</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>2</thr:total><feedburner:origLink>http://sandrotosi.blogspot.com/2010/04/my-nerd-score-is.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkMDR3k8cCp7ImA9WxFSEks.&quot;"><id>tag:blogger.com,1999:blog-462006525194985726.post-3135385525995686994</id><published>2010-04-14T18:30:00.006+02:00</published><updated>2010-04-14T19:01:16.778+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-04-14T19:01:16.778+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="reportbug" /><category scheme="http://www.blogger.com/atom/ns#" term="Debian" /><title>select count(bugs) in reportbug where status is open = 91</title><content type="html">well, the actual select (against UDD) would be&lt;br /&gt;&lt;pre&gt;udd=&gt; select source, all_bugs from bugs_count where source = 'reportbug';&lt;br /&gt;source   | all_bugs&lt;br /&gt;----------+----------&lt;br /&gt;reportbug |       91&lt;/pre&gt;but the result is the same: &lt;span style="font-weight: bold;"&gt;less than 100 bugs against reportbug&lt;/span&gt;! Yay!&lt;br /&gt;&lt;br /&gt;As you can see from the &lt;a href="http://people.debian.org/%7Eglandium/bts/r/reportbug.png"&gt;bugs graph&lt;/a&gt;, the Christmas and Easter holidays helped quite a lot to squash those bugs. When I first step into the reportbug world, the bugs count was around 250, and I first imagined in my mind to brake the 200 barrier, than the 150 and finally the less-than-100 one: while the first 2 limits where the hardest one (new to the codebase, other interest) the last one is the one I'm most proud of.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;use SOAP to query the BTS (no comment here please...)&lt;/li&gt;&lt;li&gt;use the &lt;span style="font-family:courier new;"&gt;new.822&lt;/span&gt; to query NEW or incoming and all other &lt;span style="font-style: italic;"&gt;sub-queues&lt;/span&gt;&lt;/li&gt;&lt;li&gt;a proper unittest (and I hope the talk @ PyCon Italia will help on this) and check suite&lt;/li&gt;&lt;li&gt;code refactoring and clean-up of the several dead-branches laying in it&lt;/li&gt;&lt;li&gt;several other smaller things but still interesting&lt;/li&gt;&lt;/ul&gt;They seem quite nice-to-have stuff but recently I've tried to concentrate on reply fast to new report, fix as many reported crashes as possible and implement some of the long-awaited features.&lt;br /&gt;&lt;br /&gt;Additionally, sometimes "No, sorry" is the proper reply to a bug and then it can be closed: it's hypocrite to keep bugs opened while internally you think it's a wontfix but you're not closing them because of a fear of possibly upset the reporters.&lt;br /&gt;&lt;br /&gt;There will be more in the future, that's for sure, but I think this is the reportbug we'll see in squeeze, modulo some new crashes or very interesting feature we want it, so expect minor releases from now until squeeze+1&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/462006525194985726-3135385525995686994?l=sandrotosi.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/J-qB4qcNGGrhJs0U23r-dCWvLpA/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/J-qB4qcNGGrhJs0U23r-dCWvLpA/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/J-qB4qcNGGrhJs0U23r-dCWvLpA/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/J-qB4qcNGGrhJs0U23r-dCWvLpA/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/SandroTosi/~4/jWByXyCFYGo" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://sandrotosi.blogspot.com/feeds/3135385525995686994/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=462006525194985726&amp;postID=3135385525995686994" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/462006525194985726/posts/default/3135385525995686994?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/462006525194985726/posts/default/3135385525995686994?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SandroTosi/~3/jWByXyCFYGo/select-countbugs-in-reportbug-where.html" title="select count(bugs) in reportbug where status is open = 91" /><author><name>Sandro Tosi</name><uri>http://www.blogger.com/profile/17077191422205823991</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://sandrotosi.blogspot.com/2010/04/select-countbugs-in-reportbug-where.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUEERHczfip7ImA9WxBaFUQ.&quot;"><id>tag:blogger.com,1999:blog-462006525194985726.post-7228667069302878642</id><published>2010-03-26T10:41:00.003+01:00</published><updated>2010-03-26T11:00:05.986+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-03-26T11:00:05.986+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="pycon4" /><category scheme="http://www.blogger.com/atom/ns#" term="pycon" /><category scheme="http://www.blogger.com/atom/ns#" term="Python" /><title>I'm going to Pycon Italia 4</title><content type="html">Yep, I'll be there this year too (sadly I can't say it's my fourth time, since I missed Pycon1).&lt;br /&gt;&lt;br /&gt;I'm not that excited about the proposed talks, hey we don't need that much of Django :) I hope the invited speakers will surprise me, I'm confident the organization will do that.&lt;br /&gt;&lt;br /&gt;See ya there!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/462006525194985726-7228667069302878642?l=sandrotosi.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/-f4eHdzti9npk0lPydPTm1dVuTU/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/-f4eHdzti9npk0lPydPTm1dVuTU/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/-f4eHdzti9npk0lPydPTm1dVuTU/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/-f4eHdzti9npk0lPydPTm1dVuTU/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/SandroTosi/~4/Us8A-yzlfcg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://sandrotosi.blogspot.com/feeds/7228667069302878642/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=462006525194985726&amp;postID=7228667069302878642" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/462006525194985726/posts/default/7228667069302878642?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/462006525194985726/posts/default/7228667069302878642?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SandroTosi/~3/Us8A-yzlfcg/im-going-to-pycon-italia-4.html" title="I'm going to Pycon Italia 4" /><author><name>Sandro Tosi</name><uri>http://www.blogger.com/profile/17077191422205823991</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://sandrotosi.blogspot.com/2010/03/im-going-to-pycon-italia-4.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0MCQnY6cCp7ImA9WxBbGE8.&quot;"><id>tag:blogger.com,1999:blog-462006525194985726.post-232044111229563243</id><published>2010-03-17T12:23:00.003+01:00</published><updated>2010-03-17T12:31:03.818+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-03-17T12:31:03.818+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="sysadmin" /><category scheme="http://www.blogger.com/atom/ns#" term="Nagios" /><category scheme="http://www.blogger.com/atom/ns#" term="Python" /><title>Check Nagios from the desktop: nagstamon</title><content type="html">I just discovered &lt;a href="http://nagstamon.sourceforge.net/"&gt;nagstamon&lt;/a&gt; and all the team fallen in love with it!&lt;br /&gt;&lt;br /&gt;I tried to use &lt;a href="https://addons.mozilla.org/en-US/firefox/addon/3607"&gt;Nagios Checker&lt;/a&gt;, the Firefox plugin to notify of any Nagios alert, but that doesn't play nicely with several opened windows (alerts are multiplied for the number of windows, since it seems everyone does the checks, not just one) and it tends to slow down Firefox, that's already quite slow per se :)&lt;br /&gt;&lt;br /&gt;The upstream author provides a Debian package, so promptly I wrote to him asking if he can consider maintain the package in Debian, with me as mentor/co-maintainer and so (it's in Python so I can that :) ); let's see how it goes.&lt;br /&gt;&lt;br /&gt;Give it a try, it's really simple and awesome!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/462006525194985726-232044111229563243?l=sandrotosi.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/mdMG2Rl8K7yfhkj924KJfNeuGQU/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/mdMG2Rl8K7yfhkj924KJfNeuGQU/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/mdMG2Rl8K7yfhkj924KJfNeuGQU/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/mdMG2Rl8K7yfhkj924KJfNeuGQU/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/SandroTosi/~4/B0tj_jjAnDA" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://sandrotosi.blogspot.com/feeds/232044111229563243/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=462006525194985726&amp;postID=232044111229563243" title="6 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/462006525194985726/posts/default/232044111229563243?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/462006525194985726/posts/default/232044111229563243?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SandroTosi/~3/B0tj_jjAnDA/check-nagios-from-desktop-nagstamon.html" title="Check Nagios from the desktop: nagstamon" /><author><name>Sandro Tosi</name><uri>http://www.blogger.com/profile/17077191422205823991</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>6</thr:total><feedburner:origLink>http://sandrotosi.blogspot.com/2010/03/check-nagios-from-desktop-nagstamon.html</feedburner:origLink></entry></feed>

