<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Luc Stepniewski&#039;s Blog &#187; python</title>
	<atom:link href="http://www.gradstein.info/category/python/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.gradstein.info</link>
	<description></description>
	<lastBuildDate>Thu, 29 Dec 2011 22:59:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<atom:link rel='hub' href='http://www.gradstein.info/?pushpress=hub'/>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>New version of chess PGN to TeX to PDF converter</title>
		<link>http://www.gradstein.info/python/version-chess-pgn-tex-pdf-converter/</link>
		<comments>http://www.gradstein.info/python/version-chess-pgn-tex-pdf-converter/#comments</comments>
		<pubDate>Tue, 28 Dec 2010 01:37:08 +0000</pubDate>
		<dc:creator>Lior Gradstein</dc:creator>
				<category><![CDATA[chess]]></category>
		<category><![CDATA[kid]]></category>
		<category><![CDATA[latex]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[children]]></category>
		<category><![CDATA[convert]]></category>
		<category><![CDATA[converter]]></category>
		<category><![CDATA[game]]></category>
		<category><![CDATA[learning]]></category>
		<category><![CDATA[mate in one]]></category>
		<category><![CDATA[pdf]]></category>
		<category><![CDATA[pgn]]></category>
		<category><![CDATA[tetex]]></category>
		<category><![CDATA[tex]]></category>
		<category><![CDATA[tex live]]></category>

		<guid isPermaLink="false">http://www.gradstein.info/?p=418</guid>
		<description><![CDATA[OK, I&#8217;m shameful. After fighting with Scid&#8217;s exporter, and then correcting bugs in pgn2ltx&#8217;s source, I finally decided to take a look at that PGN file format. And guess what? It&#8217;s already composed of FEN notation. And guess what? that super-über cool new skaknew module for LaTeX gets its input as FEN!! So, if I [...]]]></description>
			<content:encoded><![CDATA[<p>OK, I&#8217;m shameful. After fighting with <a href="http://scid.sourceforge.net/" class="liexternal">Scid&#8217;s</a> exporter, and then correcting bugs in pgn2ltx&#8217;s source, I finally decided to take a look at that <a href="http://en.wikipedia.org/wiki/Portable_Game_Notation" rel="nofollow" class="liwikipedia">PGN</a> file format. And guess what? It&#8217;s already composed of <a href="http://en.wikipedia.org/wiki/Forsyth%E2%80%93Edwards_Notation" rel="nofollow" class="liwikipedia">FEN</a> notation. And guess what? that super-über cool new skaknew module for LaTeX gets its input as FEN!!</p>
<p><span id="more-418"></span></p>
<p>So, if I had a working brain 1 week ago (at least), I would write a small python program that would eat that PGN and make it into a nicely formatted skaknew TeX formatted file!</p>
<p>Here is that much wanted program, that took just 5 minutes to write:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
</pre></td><td class="code"><pre class="python" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">#!/usr/bin/env python</span>
<span style="color: #808080; font-style: italic;"># -*- coding: utf-8 -*-</span>
<span style="color: #808080; font-style: italic;">#</span>
<span style="color: #808080; font-style: italic;"># vim:syntax=python:sw=4:ts=4:expandtab</span>
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">sys</span>,<span style="color: #dc143c;">re</span>
&nbsp;
HEADER=<span style="color: #483d8b;">&quot;&quot;&quot;<span style="color: #000099; font-weight: bold;">\</span>
<span style="color: #000099; font-weight: bold;">\\</span>documentclass[10pt,twocolumn]{article}
&nbsp;
<span style="color: #000099; font-weight: bold;">\\</span>usepackage[skaknew]{chessboard,skak}
%<span style="color: #000099; font-weight: bold;">\\</span>usepackage[ps]{skak}
<span style="color: #000099; font-weight: bold;">\\</span>usepackage{latexsym}
<span style="color: #000099; font-weight: bold;">\\</span>usepackage[utf8]{inputenc}
<span style="color: #000099; font-weight: bold;">\\</span>font<span style="color: #000099; font-weight: bold;">\\</span>logo=logo10
<span style="color: #000099; font-weight: bold;">\\</span>font<span style="color: #000099; font-weight: bold;">\\</span>sknf=SkakNew-Figurine
<span style="color: #000099; font-weight: bold;">\\</span>font<span style="color: #000099; font-weight: bold;">\\</span>sknfbx=SkakNew-FigurineBold
<span style="color: #000099; font-weight: bold;">\\</span>font<span style="color: #000099; font-weight: bold;">\\</span>skndia=SkakNew-DiagramT
<span style="color: #000099; font-weight: bold;">\\</span>def<span style="color: #000099; font-weight: bold;">\\</span>Metafont{<span style="color: #000099; font-weight: bold;">\\</span>mbox{<span style="color: #000099; font-weight: bold;">\\</span>logo METAFONT}}
&nbsp;
<span style="color: #000099; font-weight: bold;">\\</span>usepackage{a4wide}
%<span style="color: #000099; font-weight: bold;">\\</span>usepackage{geometry} % to change the page dimensions
%<span style="color: #000099; font-weight: bold;">\\</span>geometry{a4paper}
%%<span style="color: #000099; font-weight: bold;">\\</span>geometry{margin=5in}
%<span style="color: #000099; font-weight: bold;">\\</span>geometry{portrait}
&nbsp;
<span style="color: #000099; font-weight: bold;">\\</span>usepackage{fancyhdr} % This should be set AFTER setting up the page geometry
<span style="color: #000099; font-weight: bold;">\\</span>pagestyle{fancy} % options: empty , plain , fancy
<span style="color: #000099; font-weight: bold;">\\</span>renewcommand{<span style="color: #000099; font-weight: bold;">\\</span>headrulewidth}{0pt} % customise the layout...
<span style="color: #000099; font-weight: bold;">\\</span>lhead{}<span style="color: #000099; font-weight: bold;">\\</span>chead{}<span style="color: #000099; font-weight: bold;">\\</span>rhead{}
<span style="color: #000099; font-weight: bold;">\\</span>lfoot{}<span style="color: #000099; font-weight: bold;">\\</span>cfoot{<span style="color: #000099; font-weight: bold;">\\</span>thepage}<span style="color: #000099; font-weight: bold;">\\</span>rfoot{}
&nbsp;
<span style="color: #000099; font-weight: bold;">\\</span>frenchspacing
<span style="color: #000099; font-weight: bold;">\\</span>begin{document}
&quot;&quot;&quot;</span>
&nbsp;
TEMPLATE=<span style="color: #483d8b;">&quot;&quot;&quot;<span style="color: #000099; font-weight: bold;">\</span>
<span style="color: #000099; font-weight: bold;">\\</span>chessboard[
   setfen=%s,
   ]
&nbsp;
&quot;&quot;&quot;</span>
&nbsp;
END_DOC = <span style="color: #483d8b;">&quot;<span style="color: #000099; font-weight: bold;">\\</span>end{document}&quot;</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> main<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>:
    pre = <span style="color: #dc143c;">sys</span>.<span style="color: black;">argv</span><span style="color: black;">&#91;</span><span style="color: #ff4500;">1</span><span style="color: black;">&#93;</span>.<span style="color: black;">split</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'.'</span>,<span style="color: #ff4500;">2</span><span style="color: black;">&#41;</span><span style="color: black;">&#91;</span><span style="color: #ff4500;">0</span><span style="color: black;">&#93;</span>
    output_file = <span style="color: #008000;">open</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;%s-out.tex&quot;</span> <span style="color: #66cc66;">%</span> pre,<span style="color: #483d8b;">'w'</span><span style="color: black;">&#41;</span>
&nbsp;
    <span style="color: #808080; font-style: italic;"># First, write the header</span>
    output_file.<span style="color: black;">write</span><span style="color: black;">&#40;</span>HEADER<span style="color: black;">&#41;</span>
&nbsp;
    expr = <span style="color: #dc143c;">re</span>.<span style="color: #008000;">compile</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'^<span style="color: #000099; font-weight: bold;">\[</span>FEN &quot;([^&quot;]+)&quot;<span style="color: #000099; font-weight: bold;">\]</span>'</span><span style="color: black;">&#41;</span>
    <span style="color: #ff7700;font-weight:bold;">for</span> line <span style="color: #ff7700;font-weight:bold;">in</span> <span style="color: #008000;">open</span><span style="color: black;">&#40;</span><span style="color: #dc143c;">sys</span>.<span style="color: black;">argv</span><span style="color: black;">&#91;</span><span style="color: #ff4500;">1</span><span style="color: black;">&#93;</span><span style="color: black;">&#41;</span>.<span style="color: black;">xreadlines</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>:
        result = expr.<span style="color: black;">search</span><span style="color: black;">&#40;</span>line<span style="color: black;">&#41;</span>
        <span style="color: #ff7700;font-weight:bold;">if</span> result:
            output_file.<span style="color: black;">write</span><span style="color: black;">&#40;</span>TEMPLATE <span style="color: #66cc66;">%</span> result.<span style="color: black;">group</span><span style="color: black;">&#40;</span><span style="color: #ff4500;">1</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>
&nbsp;
    output_file.<span style="color: black;">write</span><span style="color: black;">&#40;</span>END_DOC<span style="color: black;">&#41;</span>
    output_file.<span style="color: black;">close</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">if</span> __name__ == <span style="color: #483d8b;">'__main__'</span>:
    main<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span></pre></td></tr></table></div>

<p>And the best of all, is that I have now full control in its output (well, in my light LaTeX&#8217;s knowledge limits). So now I can add a marker to tell which turn it is (little colored square box next to each game). You wll still get 1<a href="http://www.gradstein.info/wp-content/uploads/mate_in_one-out.pdf" class="lipdf">96 pages</a>, that is 1171 mate in one diagrams to solve.</p>
<p><a href="http://www.gradstein.info/wp-content/uploads/2010/12/pdf-screen.png" class="liimagelink"><img class="aligncenter size-full wp-image-419" title="Example of chess diagram output" src="http://www.gradstein.info/wp-content/uploads/2010/12/pdf-screen.png" alt="" width="462" height="690" /></a></p>
<p>So, to summarize, here are the files:</p>
<ul>
<li>The <a href="http://www.gradstein.info/wp-content/uploads/mate_in_one-out.pdf" class="lipdf">generated PDF</a></li>
<li>The intermediate file, <a href="http://www.gradstein.info/wp-content/uploads/mate_in_one-out.tex" class="liinternal">in TeX format</a></li>
<li>The original file, in <a href="http://www.gradstein.info/static/mate_in_one.pgn.gz" class="lizip">PGN format</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.gradstein.info/python/version-chess-pgn-tex-pdf-converter/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to make the simplest unittests in Python</title>
		<link>http://www.gradstein.info/python/simplest-unittests-python/</link>
		<comments>http://www.gradstein.info/python/simplest-unittests-python/#comments</comments>
		<pubDate>Wed, 15 Sep 2010 12:21:43 +0000</pubDate>
		<dc:creator>Lior Gradstein</dc:creator>
				<category><![CDATA[python]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[Development Tools]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[python projects]]></category>
		<category><![CDATA[tests]]></category>
		<category><![CDATA[unittests]]></category>

		<guid isPermaLink="false">http://www.gradstein.info/?p=405</guid>
		<description><![CDATA[Testing your code is nearly a requirement (even more so in Ruby). Unittests are now the most vital elements for evaluating the quality/viability of a project. I was a little jealous of Ruby where you don&#8217;t have so much to write to implement unittests. Here is a simple example: 1 2 3 4 5 6 [...]]]></description>
			<content:encoded><![CDATA[<p>Testing your code is nearly a requirement (even more so in Ruby). Unittests are now the most vital elements for evaluating the quality/viability of a project.<br />
I was a little jealous of Ruby where you don&#8217;t have so much to write to implement unittests. Here is a simple example:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
</pre></td><td class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">&quot;mymodule&quot;</span>
<span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">&quot;test/unit&quot;</span>
&nbsp;
<span style="color:#9966CC; font-weight:bold;">class</span> TestMyModule <span style="color:#006600; font-weight:bold;">&amp;</span>lt; <span style="color:#CC00FF; font-weight:bold;"><span style="color:#6666ff; font-weight:bold;">Test::Unit::TestCase</span></span>
&nbsp;
  <span style="color:#9966CC; font-weight:bold;">def</span> test_simple
     assert_equal<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006666;">1</span>, <span style="color:#006666;">1</span> <span style="color:#006600; font-weight:bold;">&#41;</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></td></tr></table></div>

<p>Now, using <a href="http://somethingaboutorange.com/mrl/projects/nose" class="liexternal">Nose</a>, you can get even shorter code. If you do standard Python projects, you&#8217;ll use a setup.py file. To use nose, you do not even need to specify the path where to find the tests, just add two lines (tests_require and test_suite) to call nosetest:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
</pre></td><td class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">from</span> setuptools <span style="color: #ff7700;font-weight:bold;">import</span> setup, find_packages
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">sys</span>, <span style="color: #dc143c;">os</span>
<span style="color: #ff7700;font-weight:bold;">import</span> mymodule
&nbsp;
version = mymodule.__version__
&nbsp;
setup<span style="color: black;">&#40;</span>name=<span style="color: #483d8b;">'myproject'</span>,
      version=version,
      description=<span style="color: #483d8b;">&quot;Module to display blah blah blah.&quot;</span>,
      long_description=<span style="color: #483d8b;">&quot;&quot;&quot; &quot;&quot;&quot;</span>,
      classifiers=<span style="color: black;">&#91;</span><span style="color: black;">&#93;</span>, <span style="color: #808080; font-style: italic;"># Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers</span>
      keywords=<span style="color: #483d8b;">'mymodule foobar'</span>,
      author=<span style="color: #483d8b;">'Luc Stepniewski'</span>,
      author_email=<span style="color: #483d8b;">'lior@gradstein.info'</span>,
      url=<span style="color: #483d8b;">''</span>,
      license=<span style="color: #483d8b;">'GPL'</span>,
      packages=find_packages<span style="color: black;">&#40;</span>exclude=<span style="color: black;">&#91;</span><span style="color: #483d8b;">'ez_setup'</span>, <span style="color: #483d8b;">'examples'</span>, <span style="color: #483d8b;">'tests'</span><span style="color: black;">&#93;</span><span style="color: black;">&#41;</span>,
      include_package_data=<span style="color: #008000;">True</span>,
      tests_require=<span style="color: #483d8b;">'nose'</span>,
      test_suite=<span style="color: #483d8b;">'nose.collector'</span>,
      zip_safe=<span style="color: #008000;">False</span>,
      install_requires=<span style="color: black;">&#91;</span>
          <span style="color: #808080; font-style: italic;"># -*- Extra requirements: -*-</span>
          <span style="color: #483d8b;">'simplejson'</span>,
      <span style="color: black;">&#93;</span>,
      entry_points=<span style="color: #483d8b;">&quot;&quot;&quot;
      # -*- Entry points: -*-
      [console_scripts]
      mymodule = mymodule.mainmodule:main
      &quot;&quot;&quot;</span>,
      <span style="color: black;">&#41;</span></pre></td></tr></table></div>

<p>Now, to add tests, you just have to create a directory named tests (in the root of your project, where your setup.py resides, and then add a python file()s. No need to add a __init__.py to set the directory as a module. Now just add simple python files, like my-tests.py :</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
</pre></td><td class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">import</span> mymodule
&nbsp;
<span style="color: #ff7700;font-weight:bold;">class</span> TestAstInfoCli<span style="color: black;">&#40;</span><span style="color: #008000;">object</span><span style="color: black;">&#41;</span>:
    <span style="color: #ff7700;font-weight:bold;">def</span> setup<span style="color: black;">&#40;</span><span style="color: #008000;">self</span><span style="color: black;">&#41;</span>:
        <span style="color: #ff7700;font-weight:bold;">pass</span>
&nbsp;
    <span style="color: #ff7700;font-weight:bold;">def</span> teardown<span style="color: black;">&#40;</span><span style="color: #008000;">self</span><span style="color: black;">&#41;</span>:
        <span style="color: #ff7700;font-weight:bold;">pass</span>
&nbsp;
    <span style="color: #ff7700;font-weight:bold;">def</span> test_annuaire_inverse<span style="color: black;">&#40;</span><span style="color: #008000;">self</span><span style="color: black;">&#41;</span>:
        <span style="color: #ff7700;font-weight:bold;">assert</span> <span style="color: #ff4500;">1</span> == <span style="color: #ff4500;">1</span></pre></td></tr></table></div>

<p>As you can see, no need to import anything for doing unittests, not even the standard python unittest module! That&#8217;s better than ruby! The downside of this is that nose is an &#8216;external&#8217; package, so you&#8217;ll have to install it first (or set it as a dependency in your setup.py file, as shown above).</p>
<p>If you don&#8217;t use a setup.py, you can call nose directly from the command line, with &#8216;nosetest&#8217;.</p>
<p>Now, let&#8217;s find an equivalent to the really cool rspec ruby module!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gradstein.info/python/simplest-unittests-python/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Default behaviour in implementation of STOMP protocol in RabbitMQ with python</title>
		<link>http://www.gradstein.info/python/default-behaviour-implementation-stomp-protocol-rabbitmq-python/</link>
		<comments>http://www.gradstein.info/python/default-behaviour-implementation-stomp-protocol-rabbitmq-python/#comments</comments>
		<pubDate>Fri, 27 Aug 2010 15:51:39 +0000</pubDate>
		<dc:creator>Lior Gradstein</dc:creator>
				<category><![CDATA[network]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[rabbitmq]]></category>
		<category><![CDATA[Advanced Message Queuing Protocol]]></category>
		<category><![CDATA[amqp]]></category>
		<category><![CDATA[consumers]]></category>
		<category><![CDATA[direct]]></category>
		<category><![CDATA[example]]></category>
		<category><![CDATA[Internet protocols]]></category>
		<category><![CDATA[one]]></category>
		<category><![CDATA[protocol]]></category>
		<category><![CDATA[round-robin]]></category>
		<category><![CDATA[stomp]]></category>
		<category><![CDATA[stompy]]></category>

		<guid isPermaLink="false">http://www.gradstein.info/?p=368</guid>
		<description><![CDATA[Why STOMP? Why STOMP, and not directly AMQP, as I&#8217;m using RabbitMQ. No real reason, but the fact that there are less dependencies on a STOMP client, as it&#8217;s just a socket with text sent. Implementations There are several implementations of the STOMP protocol for Python. The module I chose is python-stomp (version 0.2.9), from [...]]]></description>
			<content:encoded><![CDATA[<h2>Why STOMP?</h2>
<p>Why STOMP, and not directly AMQP, as I&#8217;m using RabbitMQ. No real reason, but the fact that there are less dependencies on a STOMP client, as it&#8217;s just a socket with text sent.</p>
<h2>Implementations</h2>
<p>There are <a href="http://pypi.python.org/pypi?%3Aaction=search&#038;term=stomp&#038;submit=search" class="liexternal">several implementations</a> of the STOMP protocol for Python. The module I chose is <a href="http://pypi.python.org/pypi/stompy/" class="liexternal">python-stomp</a> (version 0.2.9), from Benjamin W. Smith. It&#8217;s simple and easy to understand.</p>
<h2>Simple Code Examples</h2>
<p>sto_send.py:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">from</span> stompy.<span style="color: black;">simple</span> <span style="color: #ff7700;font-weight:bold;">import</span> Client
&nbsp;
stomp = Client<span style="color: black;">&#40;</span>host=<span style="color: #483d8b;">'rabbitmq2'</span><span style="color: black;">&#41;</span>
stomp.<span style="color: black;">connect</span><span style="color: black;">&#40;</span>username=<span style="color: #483d8b;">'guest'</span>,password=<span style="color: #483d8b;">'noneofyourbusiness'</span><span style="color: black;">&#41;</span>
stomp.<span style="color: black;">put</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'Thomas est une b*te à Tetris...'</span>, destination=<span style="color: #483d8b;">'/queue/jeuvideo'</span><span style="color: black;">&#41;</span>
stomp.<span style="color: black;">disconnect</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span></pre></td></tr></table></div>

<p>sto_receive.py:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
</pre></td><td class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">from</span> stompy.<span style="color: black;">simple</span> <span style="color: #ff7700;font-weight:bold;">import</span> Client
&nbsp;
stomp = Client<span style="color: black;">&#40;</span>host=<span style="color: #483d8b;">'rabbitmq2'</span><span style="color: black;">&#41;</span>
stomp.<span style="color: black;">connect</span><span style="color: black;">&#40;</span>username=<span style="color: #483d8b;">'guest'</span>,password=<span style="color: #483d8b;">'noneofyourbusiness'</span><span style="color: black;">&#41;</span>
stomp.<span style="color: black;">subscribe</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'/queue/jeuvideo'</span><span style="color: black;">&#41;</span>
message = stomp.<span style="color: black;">get</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">print</span> message.<span style="color: black;">body</span>
&nbsp;
<span style="color: #808080; font-style: italic;">#stomp.ack(message)</span>
stomp.<span style="color: black;">unsubscribe</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'/queue/video'</span><span style="color: black;">&#41;</span>
stomp.<span style="color: black;">disconnect</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span></pre></td></tr></table></div>

<p>Everything is working fine, when launching sto_receive.py, I receive the message. But when I launched several receivers, I noticed, that ONLY ONE programs received the message! After some research, I found the answer: As documented <a href="https://dev.rabbitmq.com/wiki/StompGateway" class="liexternal">in the RabbitMQ wiki</a>, the default exchange is &#8216;direct&#8217;:</p>
<blockquote><p>[...]when messages leave a queue for a consumer, they are not duplicated. One message, sitting on a queue, is delivered to only one of the available consumers. [...] If there are multiple clients, all SUBSCRIBEing to the same queue, then there will be multiple consumers all on the same queue, leading to round-robin delivery to those clients.</p></blockquote>
<p>There is <a href="https://dev.rabbitmq.com/wiki/StompGateway" class="liexternal">an explanation</a> on how to change the behaviour, by changing the exchange type, and some of particular bits (like the id). I even found <a href="http://github.com/dcarley/mcollective-plugins/commit/4801dda81cdb7fca2fc3f87efdcc3295d497e973" class="liexternal">an example of modification</a> for use in the equivalent <a href="http://rubygems.org/gems/stomp" class="liexternal">STOMP Ruby module</a>.</p>
<p>Here are the modifications. The good news is that there is no need to patch the stompy module, as the author provided the possibility to pass arbitrary parameters to the headers by the use of the &#8216;conf&#8217; variable. </p>
<p>The important points are:</p>
<ul>
<li>You need to define an exchange of type amq.topic</li>
<li>You need to set an id, which is different for each client</li>
<li>As you&#8217;re using topics, you&#8217;ll have to specify a routing_key</li>
</ul>
<p>sto_receive.py:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
</pre></td><td class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">from</span> stompy.<span style="color: black;">simple</span> <span style="color: #ff7700;font-weight:bold;">import</span> Client
<span style="color: #ff7700;font-weight:bold;">import</span> uuid
&nbsp;
unique_id = uuid.<span style="color: black;">uuid4</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
&nbsp;
stomp = Client<span style="color: black;">&#40;</span>host=<span style="color: #483d8b;">'rabbitmq2'</span><span style="color: black;">&#41;</span>
stomp.<span style="color: black;">connect</span><span style="color: black;">&#40;</span>username=<span style="color: #483d8b;">'guest'</span>,password=<span style="color: #483d8b;">'nonononono'</span><span style="color: black;">&#41;</span>
&nbsp;
stomp.<span style="color: black;">subscribe</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">''</span>,
                conf=<span style="color: black;">&#123;</span><span style="color: #483d8b;">'exchange'</span>: <span style="color: #483d8b;">'amq.topic'</span>,
                      <span style="color: #483d8b;">'routing_key'</span>:<span style="color: #483d8b;">'x.#'</span>,
                      <span style="color: #483d8b;">'id'</span>: unique_id,
                      <span style="color: black;">&#125;</span><span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #808080; font-style: italic;"># Wait for a message to appear</span>
<span style="color: #ff7700;font-weight:bold;">while</span> <span style="color: #ff4500;">1</span>:
    message = stomp.<span style="color: black;">get</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
    <span style="color: #ff7700;font-weight:bold;">print</span> message.<span style="color: black;">body</span>
&nbsp;
<span style="color: #808080; font-style: italic;">#stomp.ack(message)</span>
stomp.<span style="color: black;">unsubscribe</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">''</span>,conf=<span style="color: black;">&#123;</span><span style="color: #483d8b;">'id'</span>: unique_id<span style="color: black;">&#125;</span><span style="color: black;">&#41;</span>
stomp.<span style="color: black;">disconnect</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span></pre></td></tr></table></div>

<p>sto_send.py:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
</pre></td><td class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">from</span> stompy.<span style="color: black;">simple</span> <span style="color: #ff7700;font-weight:bold;">import</span> Client
&nbsp;
&nbsp;
&nbsp;
stomp = Client<span style="color: black;">&#40;</span>host=<span style="color: #483d8b;">'rabbitmq2'</span><span style="color: black;">&#41;</span>
stomp.<span style="color: black;">connect</span><span style="color: black;">&#40;</span>username=<span style="color: #483d8b;">'guest'</span>,password=<span style="color: #483d8b;">'nonononono'</span><span style="color: black;">&#41;</span>
&nbsp;
&nbsp;
<span style="color: #ff7700;font-weight:bold;">for</span> i <span style="color: #ff7700;font-weight:bold;">in</span> <span style="color: #008000;">range</span><span style="color: black;">&#40;</span><span style="color: #ff4500;">10000</span><span style="color: black;">&#41;</span>:
 stomp.<span style="color: black;">put</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'Thomas est une b*te au Tetris...'</span>, destination=<span style="color: #483d8b;">'x.y'</span>,
          conf=<span style="color: black;">&#123;</span><span style="color: #483d8b;">'exchange'</span>:<span style="color: #483d8b;">'amq.topic'</span>,
                <span style="color: #808080; font-style: italic;">#  'routing_key':'x.y'</span>
                <span style="color: black;">&#125;</span><span style="color: black;">&#41;</span>
&nbsp;
stomp.<span style="color: black;">disconnect</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.gradstein.info/python/default-behaviour-implementation-stomp-protocol-rabbitmq-python/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Django: How to find the url/path you&#8217;re into, in a template loaded by a generic view</title>
		<link>http://www.gradstein.info/python/django-how-to-find-the-urlpath-youre-into-in-a-template-loaded-by-a-generic-view/</link>
		<comments>http://www.gradstein.info/python/django-how-to-find-the-urlpath-youre-into-in-a-template-loaded-by-a-generic-view/#comments</comments>
		<pubDate>Thu, 19 Mar 2009 22:11:39 +0000</pubDate>
		<dc:creator>Lior Gradstein</dc:creator>
				<category><![CDATA[django]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://www.gradstein.info/?p=197</guid>
		<description><![CDATA[In a Django project, I have a template that is used by two urls, which is quite common (generic views, using &#8216;create_object&#8217; and &#8216;update_object&#8217;). The problem is that I had to add a supplementary menu just when the template is loaded from the &#8216;update&#8217; generic view, and not from the &#8216;create&#8217; generic view. Making the [...]]]></description>
			<content:encoded><![CDATA[<p>In a Django project, I have a template that is used by two urls, which is quite common (generic views, using &#8216;create_object&#8217; and &#8216;update_object&#8217;). The problem is that I had to add a supplementary menu just when the template is loaded from the &#8216;update&#8217; generic view, and not from the &#8216;create&#8217; generic view.</p>
<p>Making the difference between the two urls calls at the template level is a problem because it&#8217;s managed by generic views, so the same template is used.</p>
<p>Anyways, there are several possibilities:</p>
<p>In urls.py, use the <a href="http://docs.djangoproject.com/en/dev/ref/generic-views/#django-views-generic-create-update-create-object" class="liexternal">&#8216;template_name&#8217; variable</a>, where you can speficy a specific template for this url(). That is instead of using the default &lt;model&gt;_form.html.<br />
What I don&#8217;t like in this situation, is that I will have two nearly similar templates, just for an added menu. Not cool. Another problem is that I use <a href="http://code.djangoproject.com/wiki/GenerateGenericURLs" class="liexternal">a loop to create all my urls</a>. So if I add a special template, I&#8217;ll add it to <strong>ALL my models</strong> :-(.</p>
<p>Another solution, is to find a way to use a variable in the template that would be different wether the template has been loaded by update_object or create_object.</p>
<p>In our urlpatterns in urls.py, we can use the &#8216;<strong>extra_context</strong>&#8216; variable (takes a <a href="http://docs.djangoproject.com/en/dev/ref/generic-views/?from=olddocs#django-views-generic-create-update-create-object" class="liexternal">dictionnary as parameter</a>). It is correctly managed, even when using generic views. So, you&#8217;ll have :</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;">url<span style="color: black;">&#40;</span>r<span style="color: #483d8b;">'foo/ajouter/$'</span>, <span style="color: #483d8b;">'django.views.generic.create_update.create_object'</span>,  
		<span style="color: #008000;">dict</span><span style="color: black;">&#40;</span>form_class=modelForm,
                extra_context=<span style="color: black;">&#123;</span><span style="color: #483d8b;">'usage'</span>:<span style="color: #483d8b;">'create'</span><span style="color: black;">&#125;</span>,
                name=<span style="color: #483d8b;">'foo_create'</span>,<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>
&nbsp;
url<span style="color: black;">&#40;</span>r<span style="color: #483d8b;">'foo/%s/(?P&lt;object_id&gt;<span style="color: #000099; font-weight: bold;">\d</span>+)/modifier/$'</span>,
                <span style="color: #483d8b;">'django.views.generic.create_update.update_object'</span>,
		<span style="color: #008000;">dict</span><span style="color: black;">&#40;</span>form_class=modelForm,
                extra_context=<span style="color: black;">&#123;</span><span style="color: #483d8b;">'usage'</span>:<span style="color: #483d8b;">'modify'</span><span style="color: black;">&#125;</span>,
                name=<span style="color: #483d8b;">'foo_update'</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></pre></div></div>

<p>We can also use, in urls.py, the <a href="http://docs.djangoproject.com/en/dev/ref/generic-views/?from=olddocs#django-views-generic-create-update-create-object" class="liexternal">&#8216;context_processors&#8217; variable</a>. For more information about the context processors, have <a href="http://www.b-list.org/weblog/2006/jun/14/django-tips-template-context-processors/" class="liexternal">a look at this tutorial</a>. The goal is to add &#8216;django.core.context_processors.request&#8217;, like this:</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">from</span> django.<span style="color: black;">core</span>.<span style="color: black;">context_processors</span> <span style="color: #ff7700;font-weight:bold;">import</span> request</pre></div></div>

<p>and in the url(), add context_processors:</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;">url<span style="color: black;">&#40;</span>r<span style="color: #483d8b;">'foo/ajouter/$'</span>, <span style="color: #483d8b;">'django.views.generic.create_update.create_object'</span>,  
		<span style="color: #008000;">dict</span><span style="color: black;">&#40;</span>form_class=modelForm,
		context_processors=<span style="color: black;">&#91;</span>request,<span style="color: black;">&#93;</span><span style="color: black;">&#41;</span>,
                name=<span style="color: #483d8b;">'foo_create'</span>,<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></pre></div></div>

<p>The last possiblity is a more global solution. It&#8217;s like the context_processors usage above, but added into every templates automatically.<br />
To do this, you&#8217;ll have to edit the list of Template Processors in your settings.py file. That list is run each time a template is loaded, and allows one to add any variable to the template automatically. By default (on Django 1.0.x) this list is commented out, so it has by <a href="http://docs.djangoproject.com/en/dev/ref/settings/#setting-TEMPLATE_CONTEXT_PROCESSORS" class="liexternal">default the list</a>:</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;django.core.context_processors.auth&quot;</span>,
<span style="color: #483d8b;">&quot;django.core.context_processors.debug&quot;</span>,
<span style="color: #483d8b;">&quot;django.core.context_processors.i18n&quot;</span>,
<span style="color: #483d8b;">&quot;django.core.context_processors.media&quot;</span><span style="color: black;">&#41;</span></pre></div></div>

<p>You&#8217;ll have to uncomment it, and add &#8216;django.core.context_processors.request&#8217;. By doing this, you get the variable &#8216;request.path&#8217; available in your template.</p>
<p>Finally, you&#8217;ll be able to test your variable with {% ifequal %} and display your conditional elements.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gradstein.info/python/django-how-to-find-the-urlpath-youre-into-in-a-template-loaded-by-a-generic-view/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Python snippet to get Mediawiki/Wikipedia Recent Changes externally</title>
		<link>http://www.gradstein.info/python/python-snippet-to-get-mediawikiwikipedia-recent-changes-externally/</link>
		<comments>http://www.gradstein.info/python/python-snippet-to-get-mediawikiwikipedia-recent-changes-externally/#comments</comments>
		<pubDate>Tue, 27 Jan 2009 23:37:35 +0000</pubDate>
		<dc:creator>Lior Gradstein</dc:creator>
				<category><![CDATA[mediawiki]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[bot]]></category>
		<category><![CDATA[rc]]></category>
		<category><![CDATA[recent changes]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[wikipedia]]></category>

		<guid isPermaLink="false">http://www.gradstein.info/?p=94</guid>
		<description><![CDATA[Mediawiki allows one to send Recent Changes (RC) to a UDP port. The ip address is defined by the variable wgRC2UDPAddress, and the port by the variable wgRC2UDPPort. It&#8217;s a really good idea that it&#8217;s a UDP transfer, since there is no need for any ACK, so Mediawiki doesn&#8217;t block if there is nothing listening [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.mediawiki.org/" class="liexternal">Mediawiki</a> allows one to <a href="http://wikitech.wikimedia.org/view/IRCD" class="liexternal">send Recent Changes</a> (RC) to a UDP port.<br />
The ip address is defined by the variable wgRC2UDPAddress, and the port by the variable wgRC2UDPPort. It&#8217;s a really good idea that it&#8217;s a UDP transfer, since there is no need for any ACK, so Mediawiki doesn&#8217;t block if there is nothing listening on that port.</p>
<p>These parameters must be set in the LocalSettings.php file, like this, for example.</p>
<p><code>$wgRC2UDPAddress = '127.0.0.1';<br />
$wgRC2UDPPort = 9390;<br />
</code></p>
<p>I wrote a really simple python program (more a proof of concept) that receives the data, cleans it, and then prints it to stdout :</p>
<p><code>#!/usr/bin/env python<br />
# -*- coding: utf-8 -*-<br />
#<br />
# vim:syntax=python:sw=4:ts=4:expandtab<br />
import SocketServer<br />
import re</p>
<p>HOST,PORT = '', 9390</p>
<p>class MyUDPHandler(SocketServer.BaseRequestHandler):<br />
   def handle(self):<br />
       print re.sub(r'\x03\d{0,2}', '', self.request[0])</p>
<p>if __name__ == '__main__':<br />
   server = SocketServer.UDPServer((HOST, PORT), MyUDPHandler)<br />
   server.serve_forever()</code></p>
<p>I plan to make it into a complete project that will send the data/notifications using Jabber(XMPP).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gradstein.info/python/python-snippet-to-get-mediawikiwikipedia-recent-changes-externally/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to dial a number using Asterisk and Python</title>
		<link>http://www.gradstein.info/python/how-to-dial-a-number-using-asterisk-and-python/</link>
		<comments>http://www.gradstein.info/python/how-to-dial-a-number-using-asterisk-and-python/#comments</comments>
		<pubDate>Wed, 17 Dec 2008 09:39:17 +0000</pubDate>
		<dc:creator>Lior Gradstein</dc:creator>
				<category><![CDATA[asterisk]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[voip]]></category>
		<category><![CDATA[click to dial]]></category>
		<category><![CDATA[dial]]></category>
		<category><![CDATA[originate]]></category>

		<guid isPermaLink="false">http://www.gradstein.info/?p=33</guid>
		<description><![CDATA[I didn&#8217;t find any example in Python on how to Dial a number from an Asterisk server and link it to another channel. So here&#8217;s a quick code to do it. You just need to have a manager defined in your /etc/asterisk/manager.conf defined. 1 2 3 4 5 6 7 8 9 10 11 12 [...]]]></description>
			<content:encoded><![CDATA[<p>I didn&#8217;t find any example in Python on how to Dial a number from an Asterisk server and link it to another channel. So here&#8217;s a quick code to do it. You just need to have a manager defined in your /etc/asterisk/manager.conf defined.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
</pre></td><td class="code"><pre class="shell" style="font-family:monospace;">import socket
&nbsp;
HOST=&quot;192.168.1.116&quot;
PORT=5038
&nbsp;
p = &quot;&quot;&quot;Action: login
Events: off
Username: %(username)s
Secret: %(password)s
&nbsp;
Action: originate
Channel: SIP/%(local_user)s
WaitTime: 60
CallerId: 600
Exten: %(phone_to_dial)s
Context: default
Priority: 1
&nbsp;
Action: Logoff
&quot;&quot;&quot;
def click_to_call(phone_to_dial, username, password, local_user):
    pattern = p % {
            'phone_to_dial': phone_to_dial,
            'username': username,
            'password': password,
            'local_user': local_user}
&nbsp;
    s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    s.connect((HOST, PORT))
&nbsp;
    data = s.recv(1024)
    for l in pattern.split('\n'):
        print &quot;Sending&gt;&quot;, l
        s.send(l+'\r\n')
        if l == &quot;&quot;:
            data = s.recv(1024)
            print data
    data = s.recv(1024)
    s.close()
&nbsp;
if __name__ == '__main__':
    click_to_call(phone_to_dial='123456789',
                  username='manager_login', password='yourpass',
                  local_user='600')</pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.gradstein.info/python/how-to-dial-a-number-using-asterisk-and-python/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>TurboGears and Pylons will merge! (and CleverHarold RIP)</title>
		<link>http://www.gradstein.info/python/turbogears-and-pylons-will-be-merged/</link>
		<comments>http://www.gradstein.info/python/turbogears-and-pylons-will-be-merged/#comments</comments>
		<pubDate>Wed, 27 Jun 2007 15:20:08 +0000</pubDate>
		<dc:creator>Lior Gradstein</dc:creator>
				<category><![CDATA[framework]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.gradstein.info/python/turbogears-and-pylons-will-be-merged/</guid>
		<description><![CDATA[Mark Ramm, one of TurboGears&#8216;s core developers announced on TurboGears&#8217;s mailing list that they will merge with Pylons! To be more precise, the API of TurboGears will be implemented on top of Pylons. It seems they already made some test/proof of concept that are, as they say &#8220;a huge success&#8221;. That&#8217;s really good news for [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.phptr.com/authors/bio.asp?a=304cff7b-5886-4dcf-ae59-6bbf140dd802&amp;rl=1" class="liexternal">Mark Ramm</a>, one of <a href="http://turbogears.org/" class="liexternal">TurboGears</a>&#8216;s core developers announced on <a href="http://groups.google.com/group/turbogears/browse_thread/thread/d1d2e416023e7033" class="liexternal">TurboGears&#8217;s mailing list</a> that they will merge with <a href="http://pylonshq.com/" class="liexternal">Pylons</a>! To be more precise, the API of TurboGears will be implemented on top of Pylons. It seems they already made some test/proof of concept that are, as they say &#8220;a huge success&#8221;. That&#8217;s really good news for Python web frameworks development, and a good news for me, as I&#8217;ll not have to choose between the two :-</p>
<p>As a sidenote, it seems another framework, <a href="http://www.gradstein.info/python/another-fine-new-web-framework-clever-harold/" class="liinternal">CleverHarold</a> has disappeared without anybody noticing. Its domain is parked, and today its <a href="http://groups.google.com/group/cleverharold" class="liexternal">Google Group page</a> went off (the last messages were from people asking if the project was still alive).</p>
<p><strong>Update:</strong>  <a href="http://www.oreillynet.com/pub/au/3039" class="liexternal">Noah Gift</a><span class="ISI_IGNORE"> wrote a <a href="http://www.oreillynet.com/onlamp/blog/2007/06/python_web_application_framewo.html" class="liexternal">nice article</a> about the merge. </span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.gradstein.info/python/turbogears-and-pylons-will-be-merged/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Videos of every presentation of Journée Python 2007 are now online!</title>
		<link>http://www.gradstein.info/python/videos-of-every-presentation-of-journee-python-2007-are-now-online/</link>
		<comments>http://www.gradstein.info/python/videos-of-every-presentation-of-journee-python-2007-are-now-online/#comments</comments>
		<pubDate>Tue, 12 Jun 2007 00:50:16 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[language]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[twisted]]></category>

		<guid isPermaLink="false">http://www.gradstein.info/language/videos-of-every-presentation-of-journee-python-2007-are-now-online/</guid>
		<description><![CDATA[As the title says it, each presentation was filmed, and has just been uploaded for everyone&#8217;s pleasure! Here is the two-part video presentation of Twisted, done by Michael SCHERER. Oh, by the way, please take a minute to vote for your favourite Internet Engine!]]></description>
			<content:encoded><![CDATA[<p>As the title says it, each <a href="http://journees.afpy.org/programme" class="liexternal">presentation was filmed</a>, and has just been uploaded for everyone&#8217;s pleasure! Here is the two-part video presentation of Twisted, done by Michael SCHERER.</p>
<p><embed id="VideoPlayback" src="http://video.google.de/googleplayer.swf?docid=8739163173039026567&hl=de&fs=true" style="width:400px;height:326px" allowFullScreen="true" allowScriptAccess="always" type="application/x-shockwave-flash"> </embed><br />
<embed id="VideoPlayback" src="http://video.google.de/googleplayer.swf?docid=1837647658089311574&hl=de&fs=true" style="width:400px;height:326px" allowFullScreen="true" allowScriptAccess="always" type="application/x-shockwave-flash"> </embed></p>
<p>Oh, by the way, please take a minute to vote for your favourite Internet Engine!</p>
<p align="center">
<iframe src="http://jyte.com/widget/claim/twistedmatrix.com-is-the-engine-of-your-internet" style="width:400px;height:60px;border:1px solid #777;" scrolling="no"></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://www.gradstein.info/python/videos-of-every-presentation-of-journee-python-2007-are-now-online/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Journées Python Francophone 2007 Conference at La Villette, France</title>
		<link>http://www.gradstein.info/python/22/</link>
		<comments>http://www.gradstein.info/python/22/#comments</comments>
		<pubDate>Sun, 03 Jun 2007 20:35:17 +0000</pubDate>
		<dc:creator>Lior Gradstein</dc:creator>
				<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://www.gradstein.info/python/22/</guid>
		<description><![CDATA[I went today to the JournÃ©e Python 2007 Conference in France. I managed to see half of the Twisted intro, some lightning talks, and most of the afternoon presentations (thanks to Ido&#8217;s mid-day nap). Most of the talks were introductory type, but they were finely presented (alas most of the audience already knew python). I [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.gradstein.info/wp-content/uploads/image5.jpg" class="liimagelink"><img src="http://www.gradstein.info/wp-content/uploads/.thumbs/.image5.jpg" alt="Journee Python Conference 2007" align="right" border="0" height="72" width="96" /></a>I went today to the JournÃ©e Python 2007 Conference in France. I managed to see half of the Twisted intro, some lightning talks, and most of the afternoon presentations (thanks to Ido&#8217;s mid-day nap).</p>
<p>Most of the talks were introductory type, but they were finely presented (alas most of the audience already knew python). I hope I&#8217;ll find the time to prepare some more advanced Twisted presentation for next year&#8217;s Conference (there&#8217;s one, right?)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gradstein.info/python/22/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nice introduction article on Pylons</title>
		<link>http://www.gradstein.info/python/nice-introduction-article-on-pylons/</link>
		<comments>http://www.gradstein.info/python/nice-introduction-article-on-pylons/#comments</comments>
		<pubDate>Mon, 07 May 2007 08:37:00 +0000</pubDate>
		<dc:creator>Lior Gradstein</dc:creator>
				<category><![CDATA[framework]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.gradstein.info/uncategorized/nice-introduction-article-on-pylons/</guid>
		<description><![CDATA[Pylons is a cool web framework (one more, besides TurboGears, Django, Zope, etc.). Someone posted on the mailing list a reference to a nice introduction.]]></description>
			<content:encoded><![CDATA[<p><a href="http://pylonshq.com/" class="liexternal">Pylons</a> is a cool web framework (one more, besides TurboGears, Django, Zope, etc.). Someone posted on the mailing list a reference to a <a href="http://www.rexx.com/%7Edkuhlman/" class="liexternal">nice introduction</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gradstein.info/python/nice-introduction-article-on-pylons/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using memcached

Served from: www.stepniewski.fr @ 2012-02-06 07:49:56 -->
