<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">

 <title type="text">Andi Albrecht</title>
 <subtitle type="html">This is my blog</subtitle>
 <link type="application/atom+xml" rel="self"
       href="http://andialbrecht.de/atom.xml"/>
 <link rel="hub" href="http://pubsubhubbub.appspot.com" />
 <link type="text/html" rel="alternate" href="http://andialbrecht.de/"/>
 <updated>2011-09-26T11:13:46+02:00</updated>
 <id>http://andialbrecht.de</id>
 <author>
   <name>Andi Albrecht</name>
 </author>

 
 
 <entry>
   <title>Running flake8 in Emacs</title>
   <link rel="alternate" type="text/html"
	 href="http://andialbrecht.de/blog/2011/09/26/running-flake8-in-emacs.html"/>
   <updated>2011-09-26T00:00:00+02:00</updated>
   <published>2011-09-26T00:00:00+02:00</published>
   <id>http://andialbrecht.de/blog/2011/09/26/running-flake8-in-emacs</id>
   <author>
     <name>Andi Albrecht</name>
   </author>
   <content type="html">&lt;div id=&quot;outline-container-1&quot; class=&quot;outline-2&quot;&gt;
&lt;h2 id=&quot;sec-1&quot;&gt;&lt;a href=&quot;http://andialbrecht.de/blog/2011/09/26/running-flake8-in-emacs.html&quot;&gt;Running flake8 in Emacs&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;outline-text-2&quot; id=&quot;text-1&quot;&gt;

&lt;p&gt;Some time ago I've discovered &lt;a href=&quot;https://gist.github.com/302848&quot;&gt;python-pylint.el&lt;/a&gt;, a minor mode for Emacs
to run pylint in compilation mode. Running pylint in compilation mode
is really nice since you can jump between errors with the usual Emacs
keyboard shortcuts &lt;code&gt;M-g n&lt;/code&gt; / &lt;code&gt;M-g p&lt;/code&gt;.
&lt;/p&gt;
&lt;p&gt;
But when focussing more on style then I want to run &lt;a href=&quot;https://bitbucket.org/tarek/flake8&quot;&gt;&lt;code&gt;flake8&lt;/code&gt;&lt;/a&gt;
instead. &lt;a href=&quot;https://gist.github.com/1241830&quot;&gt;Here's a thin wrapper (gist.github.com)&lt;/a&gt; around python-pylint
that runs flake8 in compilation mode and parses the output. Nothing
special, just the right commands and a regex to parse the output - but
helpful :)
  &lt;script src=&quot;https://gist.github.com/1241830.js&quot;&gt; &lt;/script&gt;
&lt;/p&gt;&lt;/div&gt;
&lt;/div&gt;
</content>
 </entry>
 
 
 
 <entry>
   <title>For the context switchers - git branch I/O</title>
   <link rel="alternate" type="text/html"
	 href="http://andialbrecht.de/blog/2011/08/11/for-the-context-switchers---git-branch-io.html"/>
   <updated>2011-08-11T00:00:00+02:00</updated>
   <published>2011-08-11T00:00:00+02:00</published>
   <id>http://andialbrecht.de/blog/2011/08/11/for-the-context-switchers---git-branch-io</id>
   <author>
     <name>Andi Albrecht</name>
   </author>
   <content type="html">&lt;div id=&quot;outline-container-1&quot; class=&quot;outline-2&quot;&gt;
&lt;h2 id=&quot;sec-1&quot;&gt;&lt;a href=&quot;http://andialbrecht.de/blog/2011/08/11/for-the-context-switchers---git-branch-io.html&quot;&gt;For the context switchers - git branch I/O&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;outline-text-2&quot; id=&quot;text-1&quot;&gt;

&lt;p&gt;At work I'm switching contexts quite often. While working on a
long-term feature, I'll have to switch to do a bug fix, then I'll
have to add a feature request that's done in a few hours and so
on&amp;hellip;
&lt;/p&gt;
&lt;p&gt;
Usually I end up with several git branches in my working copy. For
example, currently I have three branches:
&lt;/p&gt;



&lt;pre class=&quot;src src-sh&quot;&gt;$ git branch
  issue3521
  master
* work

&lt;/pre&gt;




&lt;p&gt;
One goes upstream (&quot;master&quot;), one for instant fixes (&quot;work&quot;), one
feature branch (&quot;issue3521&quot;).
&lt;/p&gt;
&lt;p&gt;
To get a quick overview of the current state of all branches I've
added a very simple git extension to my setup that shows incoming and
outgoing commits for each branch. I found the script (besides the
issues it has) quite useful. It gives me just as little information as
needed to orient myself after a couple of changes here and there. It
just visualizes incoming and outgoing commits relative to a
branch.
&lt;/p&gt;
&lt;p&gt;
The following screenshot illustrates it's usage. The colors have the
following meanings:
&lt;/p&gt;


&lt;center&gt;

&lt;table border=&quot;2&quot; cellspacing=&quot;0&quot; cellpadding=&quot;6&quot; rules=&quot;groups&quot; frame=&quot;hsides&quot;&gt;
&lt;caption&gt;&lt;/caption&gt;
&lt;colgroup&gt;&lt;col class=&quot;left&quot; /&gt;&lt;col class=&quot;left&quot; /&gt;
&lt;/colgroup&gt;
&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;left&quot;&gt;&lt;b&gt;green&lt;/b&gt;&lt;/td&gt;&lt;td class=&quot;left&quot;&gt;everything's fine&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;left&quot;&gt;&lt;b&gt;blue&lt;/b&gt;&lt;/td&gt;&lt;td class=&quot;left&quot;&gt;almost ok&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;left&quot;&gt;&lt;b&gt;yellow&lt;/b&gt;&lt;/td&gt;&lt;td class=&quot;left&quot;&gt;take care&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;left&quot;&gt;&lt;b&gt;red&lt;/b&gt;&lt;/td&gt;&lt;td class=&quot;left&quot;&gt;do something&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;


&lt;p&gt;
&lt;img src=&quot;../../../../img/git-branchio.png&quot;  alt=&quot;../../../../img/git-branchio.png&quot; /&gt;
&lt;/p&gt;
&lt;p&gt;
(Note, &lt;code&gt;git bio&lt;/code&gt; is just an alias to &lt;code&gt;git branch-io&lt;/code&gt;.)
&lt;/p&gt;


&lt;/center&gt;

&lt;p&gt;
So in that case I should keep an eye on &lt;code&gt;issue3521&lt;/code&gt; to keep it in sync
with master, should merge back one commit from &lt;code&gt;work&lt;/code&gt; to master and
definitely should to something about the branch called &lt;code&gt;outofdate&lt;/code&gt;.
&lt;/p&gt;
&lt;p&gt;
If you want to give it a try, here's the &lt;a href=&quot;https://gist.github.com/1000141&quot;&gt;extension (gist.github.com)&lt;/a&gt;.
&lt;/p&gt;


  &lt;script src=&quot;https://gist.github.com/1000141.js&quot;&gt; &lt;/script&gt;
&lt;/div&gt;
&lt;/div&gt;
</content>
 </entry>
 
 
 
 <entry>
   <title>sqlparse 0.1.3</title>
   <link rel="alternate" type="text/html"
	 href="http://andialbrecht.de/blog/2011/07/29/sqlparse-0-1-3.html"/>
   <updated>2011-07-29T00:00:00+02:00</updated>
   <published>2011-07-29T00:00:00+02:00</published>
   <id>http://andialbrecht.de/blog/2011/07/29/sqlparse-0-1-3</id>
   <author>
     <name>Andi Albrecht</name>
   </author>
   <content type="html">&lt;div id=&quot;outline-container-1&quot; class=&quot;outline-2&quot;&gt;
&lt;h2 id=&quot;sec-1&quot;&gt;&lt;a href=&quot;http://andialbrecht.de/blog/2011/07/29/sqlparse-0-1-3.html&quot;&gt;sqlparse 0.1.3&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;outline-text-2&quot; id=&quot;text-1&quot;&gt;

&lt;p&gt;I've just released a new bug fix release for &lt;a href=&quot;http://python-sqlparse.googlecode.com&quot;&gt;sqlparse&lt;/a&gt;.
&lt;/p&gt;

&lt;/div&gt;

&lt;div id=&quot;outline-container-1-1&quot; class=&quot;outline-3&quot;&gt;
&lt;h3 id=&quot;sec-1-1&quot;&gt;Changes since 0.1.2&lt;/h3&gt;
&lt;div class=&quot;outline-text-3&quot; id=&quot;text-1-1&quot;&gt;



&lt;/div&gt;

&lt;div id=&quot;outline-container-1-1-1&quot; class=&quot;outline-4&quot;&gt;
&lt;h4 id=&quot;sec-1-1-1&quot;&gt;Bug Fixes&lt;/h4&gt;
&lt;div class=&quot;outline-text-4&quot; id=&quot;text-1-1-1&quot;&gt;

&lt;ul&gt;
&lt;li&gt;Improve parsing of floats (thanks to Kris).
&lt;/li&gt;
&lt;li&gt;When formatting a statement a space before LIMIT was removed (issue35).
&lt;/li&gt;
&lt;li&gt;Fix strip&lt;sub&gt;comments&lt;/sub&gt; flag (issue38, reported by ooberm&amp;hellip;@gmail.com).
&lt;/li&gt;
&lt;li&gt;Avoid parsing names as keywords (issue39, reported by djo&amp;hellip;@taket.org).
&lt;/li&gt;
&lt;li&gt;Make sure identifier lists in subselects are grouped (issue40,
   reported by djo&amp;hellip;@taket.org).
&lt;/li&gt;
&lt;li&gt;Split statements with IF as functions correctly (issue33 and
   issue29, reported by charles&amp;hellip;.@unige.ch).
&lt;/li&gt;
&lt;li&gt;Relax detection of keywords, esp. when used as function names
   (issue36, nyuhu&amp;hellip;@gmail.com).
&lt;/li&gt;
&lt;li&gt;Don't treat single characters as keywords (issue32).
&lt;/li&gt;
&lt;li&gt;Improve parsing of stand-alone comments (issue26).
&lt;/li&gt;
&lt;li&gt;Detection of placeholders in paramterized queries (issue22,
   reported by Glyph Lefkowitz).
&lt;/li&gt;
&lt;li&gt;Add parsing of MS Access column names with braces (issue27,
   reported by frankz&amp;hellip;@gmail.com).
&lt;/li&gt;
&lt;/ul&gt;


&lt;/div&gt;

&lt;/div&gt;

&lt;div id=&quot;outline-container-1-1-2&quot; class=&quot;outline-4&quot;&gt;
&lt;h4 id=&quot;sec-1-1-2&quot;&gt;Other&lt;/h4&gt;
&lt;div class=&quot;outline-text-4&quot; id=&quot;text-1-1-2&quot;&gt;

&lt;ul&gt;
&lt;li&gt;Replace Django by Flask in &lt;a href=&quot;http://sqlformat.appspot.com&quot;&gt;App Engine frontend&lt;/a&gt; (issue11).
&lt;/li&gt;
&lt;li&gt;Documentation moved to &lt;a href=&quot;http://sqlparse.readthedocs.org/&quot;&gt;Read the Docs&lt;/a&gt;. Thanks for this great service!
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Special thanks to Andriy Senkovych for packaging sqlparse for
Debian/Ubuntu and giving some insights in all that packaging
stuff. Thanks to all other package maintainers too!
&lt;/p&gt;
&lt;p&gt;
Please file bug reports and feature request on the &lt;a href=&quot;http://code.google.com/p/python-sqlparse/issues/entry&quot;&gt;issue tracker&lt;/a&gt;.
&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content>
 </entry>
 
 
 
 <entry>
   <title>A Selenium and Python appetizer</title>
   <link rel="alternate" type="text/html"
	 href="http://andialbrecht.de/blog/2011/07/12/a-selenium-and-python-appetizer.html"/>
   <updated>2011-07-12T00:00:00+02:00</updated>
   <published>2011-07-12T00:00:00+02:00</published>
   <id>http://andialbrecht.de/blog/2011/07/12/a-selenium-and-python-appetizer</id>
   <author>
     <name>Andi Albrecht</name>
   </author>
   <content type="html">&lt;div id=&quot;outline-container-1&quot; class=&quot;outline-2&quot;&gt;
&lt;h2 id=&quot;sec-1&quot;&gt;&lt;a href=&quot;http://andialbrecht.de/blog/2011/07/12/a-selenium-and-python-appetizer.html&quot;&gt;A Selenium and Python appetizer&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;outline-text-2&quot; id=&quot;text-1&quot;&gt;

&lt;p&gt;&lt;a href=&quot;http://code.google.com/p/selenium/&quot;&gt;Selenium&lt;/a&gt; is a browser automation framework and was released in &lt;a href=&quot;http://seleniumhq.wordpress.com/2011/07/08/selenium-2-0/&quot;&gt;version 2.0.0&lt;/a&gt; just this week. In this post I'll show you how easy it is to get
started with using this fine framework in Python.
&lt;/p&gt;

&lt;/div&gt;

&lt;div id=&quot;outline-container-1-1&quot; class=&quot;outline-3&quot;&gt;
&lt;h3 id=&quot;sec-1-1&quot;&gt;Peparing the kitchen&lt;/h3&gt;
&lt;div class=&quot;outline-text-3&quot; id=&quot;text-1-1&quot;&gt;


&lt;p&gt;
Let's create and jump into a &lt;a href=&quot;http://www.virtualenv.org/&quot;&gt;virtualenv&lt;/a&gt;. You don't really need it, but
at least we don't need no &lt;code&gt;sudo&lt;/code&gt; for anything :)
&lt;/p&gt;



&lt;pre class=&quot;src src-python&quot;&gt;$ virtualenv demo
New python executable &lt;span class=&quot;org-keyword&quot;&gt;in&lt;/span&gt; demo/bin/python
Installing distribute..................................................done.
$ source demo/bin/activate
(demo) $
&lt;/pre&gt;


&lt;p&gt;
Installing the Selenium Python package is as easy as possible. Just
use your favorite package manage and install it from &lt;a href=&quot;http://pypi.python.org/pypi/selenium/&quot;&gt;PyPI&lt;/a&gt;:
&lt;/p&gt;



&lt;pre class=&quot;src src-python&quot;&gt;(demo) $ pip install selenium
&lt;/pre&gt;


&lt;p&gt;
This installs the &lt;code&gt;selenium&lt;/code&gt; Python package which includes all
necessary drivers to run your browser automation using Firefox, Chrome
or IE locally or anything that the Selenium Remote Control
provides. We come back to that later.
&lt;/p&gt;
&lt;p&gt;
If you want to automate Google's Chrome on your local machine some
little setup is needed. If you want to follow the examples in this
post and if you want to use an installed Firefox feel free to skip
this section. To automate Chrome make sure Chrome is installed and
then download and unzip the &lt;code&gt;chromedriver&lt;/code&gt; for your system from the
&lt;a href=&quot;http://code.google.com/p/selenium/downloads/list&quot;&gt;Selenium download page&lt;/a&gt;. Place the &lt;code&gt;chromedriver&lt;/code&gt; binary somewhere in
your &lt;code&gt;$PATH&lt;/code&gt;. That's it.
&lt;/p&gt;
&lt;/div&gt;

&lt;/div&gt;

&lt;div id=&quot;outline-container-1-2&quot; class=&quot;outline-3&quot;&gt;
&lt;h3 id=&quot;sec-1-2&quot;&gt;Is it Google?&lt;/h3&gt;
&lt;div class=&quot;outline-text-3&quot; id=&quot;text-1-2&quot;&gt;


&lt;p&gt;
Now that Selenium is up and running, let's write a simple script that
verifies that the title of the Google page actually contains the word
&quot;Google&quot;. That's simple and obvious, but the script illustrates how to
use Selenium in &lt;a href=&quot;http://docs.python.org/library/unittest.html&quot;&gt;UnitTests&lt;/a&gt;.
&lt;/p&gt;


&lt;p&gt;
And you can do all this fancy stuff interactive in the Python shell:
&lt;/p&gt;



&lt;pre class=&quot;src src-python&quot;&gt;&lt;span class=&quot;org-comment-delimiter&quot;&gt;#&lt;/span&gt;&lt;span class=&quot;org-comment&quot;&gt;!/usr/bin/env python&lt;/span&gt;

&lt;span class=&quot;org-keyword&quot;&gt;import&lt;/span&gt; unittest

&lt;span class=&quot;org-keyword&quot;&gt;from&lt;/span&gt; selenium &lt;span class=&quot;org-keyword&quot;&gt;import&lt;/span&gt; webdriver


&lt;span class=&quot;org-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;org-py-class-name&quot;&gt;TestTitle&lt;/span&gt;(unittest.TestCase):

    &lt;span class=&quot;org-keyword&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;org-function-name&quot;&gt;setUp&lt;/span&gt;(&lt;span class=&quot;org-py-pseudo-keyword&quot;&gt;self&lt;/span&gt;):
        &lt;span class=&quot;org-comment-delimiter&quot;&gt;# &lt;/span&gt;&lt;span class=&quot;org-comment&quot;&gt;Toggle comments to test with a different browser&lt;/span&gt;
        &lt;span class=&quot;org-py-pseudo-keyword&quot;&gt;self&lt;/span&gt;.driver = webdriver.Chrome()
        &lt;span class=&quot;org-comment-delimiter&quot;&gt;#&lt;/span&gt;&lt;span class=&quot;org-comment&quot;&gt;self.driver = webdriver.Firefox()&lt;/span&gt;
        &lt;span class=&quot;org-comment-delimiter&quot;&gt;#&lt;/span&gt;&lt;span class=&quot;org-comment&quot;&gt;self.driver = wevdriver.Ie()&lt;/span&gt;

    &lt;span class=&quot;org-keyword&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;org-function-name&quot;&gt;tearDown&lt;/span&gt;(&lt;span class=&quot;org-py-pseudo-keyword&quot;&gt;self&lt;/span&gt;):
        &lt;span class=&quot;org-py-pseudo-keyword&quot;&gt;self&lt;/span&gt;.driver.close()

    &lt;span class=&quot;org-keyword&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;org-function-name&quot;&gt;test_title_tag&lt;/span&gt;(&lt;span class=&quot;org-py-pseudo-keyword&quot;&gt;self&lt;/span&gt;):
        &lt;span class=&quot;org-py-pseudo-keyword&quot;&gt;self&lt;/span&gt;.driver.get(&lt;span class=&quot;org-string&quot;&gt;'http://google.com'&lt;/span&gt;)
        title_tag = &lt;span class=&quot;org-py-pseudo-keyword&quot;&gt;self&lt;/span&gt;.driver.find_element_by_tag_name(&lt;span class=&quot;org-string&quot;&gt;'title'&lt;/span&gt;)
        &lt;span class=&quot;org-py-pseudo-keyword&quot;&gt;self&lt;/span&gt;.assertEqual(title_tag.text, &lt;span class=&quot;org-string&quot;&gt;'Google'&lt;/span&gt;)


&lt;span class=&quot;org-keyword&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;org-py-builtins&quot;&gt;__name__&lt;/span&gt; == &lt;span class=&quot;org-string&quot;&gt;'__main__'&lt;/span&gt;:
    unittest.main()
&lt;/pre&gt;


&lt;p&gt;
This script has one little drawback. It initializes a new webdriver
(aka browser) for each tests. That's very accurate to start with a
fresh browser for each test, but very time consuming too. As an
alternative you can modify this script to use a global webdriver
instance that is initialized before &lt;code&gt;unittest.main()&lt;/code&gt; and closed after
that line.
&lt;/p&gt;
&lt;p&gt;
Since webdriver uses a network &lt;a href=&quot;http://code.google.com/p/selenium/wiki/JsonWireProtocol&quot;&gt;protocol&lt;/a&gt; to communicate with the
browser, it's painless to use it in an interactive shell:
&lt;/p&gt;



&lt;pre class=&quot;src src-python&quot;&gt;(demo) $ python
Python 2.7.1+ (r271:86832, Apr 11 2011, 18:13:53)
&amp;gt;&amp;gt;&amp;gt; &lt;span class=&quot;org-keyword&quot;&gt;from&lt;/span&gt; selenium &lt;span class=&quot;org-keyword&quot;&gt;import&lt;/span&gt; webdriver
&amp;gt;&amp;gt;&amp;gt; driver = webdriver.Chrome()
&amp;gt;&amp;gt;&amp;gt; driver.get(&lt;span class=&quot;org-string&quot;&gt;'http://google.com'&lt;/span&gt;)
&amp;gt;&amp;gt;&amp;gt; driver.find_element_by_tag_name(&lt;span class=&quot;org-string&quot;&gt;'title'&lt;/span&gt;)
&amp;lt;selenium.webdriver.remote.webelement.WebElement &lt;span class=&quot;org-py-builtins&quot;&gt;object&lt;/span&gt; at 0x29c2510&amp;gt;
&lt;/pre&gt;


&lt;p&gt;
That's a nice and easy way to figure out what webdriver commands are
available and how they work.
&lt;/p&gt;
&lt;/div&gt;

&lt;/div&gt;

&lt;div id=&quot;outline-container-1-3&quot; class=&quot;outline-3&quot;&gt;
&lt;h3 id=&quot;sec-1-3&quot;&gt;Going headless&lt;/h3&gt;
&lt;div class=&quot;outline-text-3&quot; id=&quot;text-1-3&quot;&gt;

&lt;p&gt;When using Selenium as part of your test suite, you don't have always
an X environment around to start Firefox or Chrome. As you can see in
the sample script above, it's easy to switch between different
browsers without the need to change anything in your actual tests.
&lt;/p&gt;
&lt;p&gt;
As the name suggests the remote webdriver talks to a &lt;a href=&quot;http://seleniumhq.org/projects/remote-control/&quot;&gt;Remote Control Server&lt;/a&gt; that let's you choose a browser. The nice thing is that the
standalone server comes with a headless browser that even supports
JavaScript execution much like Firefox or Chrome.
&lt;/p&gt;
&lt;p&gt;
Download the standalone server JAR on the &lt;a href=&quot;http://code.google.com/p/selenium/downloads/list&quot;&gt;Selenium download page&lt;/a&gt; and
simply run &lt;code&gt;java -jar selenium-server-standalone-2.0.0.jar&lt;/code&gt; to start
it. When the server is started you can initialize a headless browser
in your scripts like this:
&lt;/p&gt;



&lt;pre class=&quot;src src-python&quot;&gt;&lt;span class=&quot;org-keyword&quot;&gt;from&lt;/span&gt; selenium &lt;span class=&quot;org-keyword&quot;&gt;import&lt;/span&gt; webdriver
driver = webdriver.Remote(
    command_executor= &lt;span class=&quot;org-string&quot;&gt;'http://127.0.0.1:4444/wd/hub'&lt;/span&gt;,  &lt;span class=&quot;org-comment-delimiter&quot;&gt;# &lt;/span&gt;&lt;span class=&quot;org-comment&quot;&gt;that's the default&lt;/span&gt;
    desired_capabilities={&lt;span class=&quot;org-string&quot;&gt;'browserName'&lt;/span&gt;: &lt;span class=&quot;org-string&quot;&gt;'htmlunit'&lt;/span&gt;,
                          &lt;span class=&quot;org-string&quot;&gt;'version'&lt;/span&gt;: &lt;span class=&quot;org-string&quot;&gt;'2'&lt;/span&gt;,
                          &lt;span class=&quot;org-string&quot;&gt;'javascriptEnabled'&lt;/span&gt;: &lt;span class=&quot;org-py-pseudo-keyword&quot;&gt;True&lt;/span&gt;})
&lt;/pre&gt;


&lt;p&gt;
That's all to run your tests using a headless browser. Ready for your
continuous integration system running on a server somewhere.
&lt;/p&gt;
&lt;p&gt;
Testing web pages is fun, isn't it?
&lt;/p&gt;
&lt;p&gt;
&lt;b&gt;Edit 2011-07-12:&lt;/b&gt; Corey Goldberg posted a very &lt;a href=&quot;http://coreygoldberg.blogspot.com/2011/07/python-getting-started-with-selenium.html&quot;&gt;similar article&lt;/a&gt; on &lt;a href=&quot;http://coreygoldberg.blogspot.com/&quot;&gt;his blog&lt;/a&gt; a few hours before I published this post.
&lt;/p&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content>
 </entry>
 
 
 
 <entry>
   <title>Back from PythonCamp</title>
   <link rel="alternate" type="text/html"
	 href="http://andialbrecht.de/blog/2011/04/18/back-from-pythoncamp.html"/>
   <updated>2011-04-18T00:00:00+02:00</updated>
   <published>2011-04-18T00:00:00+02:00</published>
   <id>http://andialbrecht.de/blog/2011/04/18/back-from-pythoncamp</id>
   <author>
     <name>Andi Albrecht</name>
   </author>
   <content type="html">&lt;div id=&quot;outline-container-1&quot; class=&quot;outline-2&quot;&gt;
&lt;h2 id=&quot;sec-1&quot;&gt;&lt;a href=&quot;http://andialbrecht.de/blog/2011/04/18/back-from-pythoncamp.html&quot;&gt;Back from PythonCamp&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;outline-text-2&quot; id=&quot;text-1&quot;&gt;

&lt;p&gt;I'm back from a phantastic weekend at the Python BarCamp in
Cologne. We've had two great days with lots of very interesting
sessions (I'm still wondering how it's possible to stuff that many
topics with such depth in two days, but it worked!), lightning talks,
discussions, pizza, &lt;a href=&quot;http://goo.gl/QZxVY&quot;&gt;tweets&lt;/a&gt;, coffee, and and and &amp;hellip; We're still
working on the &lt;a href=&quot;http://wiki.python-forum.de/PythonBarCamp2011&quot;&gt;wiki pages&lt;/a&gt; to merge all notes taken during the sessions
on &lt;a href=&quot;http://openetherpad.org/pycamp&quot;&gt;various Etherpads&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
To get an impression search for &lt;a href=&quot;http://goo.gl/TK1np&quot;&gt;#pycamp on flickr&lt;/a&gt;.
&lt;/p&gt;


  &lt;center&gt;&lt;object width=&quot;400&quot; height=&quot;300&quot;&gt; &lt;param name=&quot;flashvars&quot; value=&quot;offsite=true&amp;lang=en-us&amp;page_show_url=%2Fsearch%2Fshow%2F%3Fq%3Dpycamp%26z%3De%26d%3Dtaken-20110415-20110418%26ct%3D0%26mt%3Dall%26adv%3D1&amp;page_show_back_url=%2Fsearch%2F%3Fq%3Dpycamp%26z%3De%26d%3Dtaken-20110415-20110418%26ct%3D0%26mt%3Dall%26adv%3D1&amp;method=flickr.photos.search&amp;api_params_str=&amp;api_text=pycamp&amp;api_tag_mode=bool&amp;api_min_taken_date=2011-04-15+00%3A00%3A00&amp;api_max_taken_date=2011-04-19+00%3A00%3A00&amp;api_media=all&amp;api_sort=relevance&amp;jump_to=&amp;start_index=0&quot;&gt;&lt;/param&gt; &lt;param name=&quot;movie&quot; value=&quot;http://www.flickr.com/apps/slideshow/show.swf?v=71649&quot;&gt;&lt;/param&gt; &lt;param name=&quot;allowFullScreen&quot; value=&quot;true&quot;&gt;&lt;/param&gt;&lt;embed type=&quot;application/x-shockwave-flash&quot; src=&quot;http://www.flickr.com/apps/slideshow/show.swf?v=71649&quot; allowFullScreen=&quot;true&quot; flashvars=&quot;offsite=true&amp;lang=en-us&amp;page_show_url=%2Fsearch%2Fshow%2F%3Fq%3Dpycamp%26z%3De%26d%3Dtaken-20110415-20110418%26ct%3D0%26mt%3Dall%26adv%3D1&amp;page_show_back_url=%2Fsearch%2F%3Fq%3Dpycamp%26z%3De%26d%3Dtaken-20110415-20110418%26ct%3D0%26mt%3Dall%26adv%3D1&amp;method=flickr.photos.search&amp;api_params_str=&amp;api_text=pycamp&amp;api_tag_mode=bool&amp;api_min_taken_date=2011-04-15+00%3A00%3A00&amp;api_max_taken_date=2011-04-19+00%3A00%3A00&amp;api_media=all&amp;api_sort=relevance&amp;jump_to=&amp;start_index=0&quot; width=&quot;400&quot; height=&quot;300&quot;&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/center&gt;
  

&lt;p&gt;
Last but not least, big, big thanks to everyone hanging around at the
&lt;a href=&quot;http://pythoncamp.de&quot;&gt;PythonCamp&lt;/a&gt; this year for making it a very interesting and relaxing
weekend!
&lt;/p&gt;&lt;/div&gt;
&lt;/div&gt;
</content>
 </entry>
 
 
 
 <entry>
   <title>Regex to parse pylint's parseable output</title>
   <link rel="alternate" type="text/html"
	 href="http://andialbrecht.de/blog/2011/04/13/regex-to-parse-pylints-parseable-output.html"/>
   <updated>2011-04-13T00:00:00+02:00</updated>
   <published>2011-04-13T00:00:00+02:00</published>
   <id>http://andialbrecht.de/blog/2011/04/13/regex-to-parse-pylints-parseable-output</id>
   <author>
     <name>Andi Albrecht</name>
   </author>
   <content type="html">&lt;div id=&quot;outline-container-1&quot; class=&quot;outline-2&quot;&gt;
&lt;h2 id=&quot;sec-1&quot;&gt;&lt;a href=&quot;http://andialbrecht.de/blog/2011/04/13/regex-to-parse-pylints-parseable-output.html&quot;&gt;Regex to parse pylint's parseable output&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;outline-text-2&quot; id=&quot;text-1&quot;&gt;


&lt;p&gt;
Just in case someone (including myself) is looking for that: Here's
the regex I'm using to parse the output from &lt;a href=&quot;http://www.logilab.org/project/pylint&quot;&gt;Pylint&lt;/a&gt; to extract error
messages. Pylint needs to be called with the &lt;code&gt;-f parseable&lt;/code&gt; flag.
&lt;/p&gt;


  &lt;script src=&quot;https://gist.github.com/917126.js&quot;&gt; &lt;/script&gt;

&lt;p&gt;
Try to match each line of Pylint's output with this regex. If it
matches call &lt;code&gt;groupdict()&lt;/code&gt; to access to information bits easily.
&lt;/p&gt;&lt;/div&gt;
&lt;/div&gt;
</content>
 </entry>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

</feed>

