<?xml version="1.0" encoding="utf-8"?><?xml-stylesheet title="XSL formatting" type="text/xsl" href="http://www.usualcoding.eu/feed/rss2/xslt" ?><rss version="2.0"
  xmlns:dc="http://purl.org/dc/elements/1.1/"
  xmlns:wfw="http://wellformedweb.org/CommentAPI/"
  xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
  <title>UsualCoding.eu - python</title>
  <link>http://www.usualcoding.eu/</link>
  <description>Use(less|ful) stuff</description>
  <language>en</language>
  <pubDate>Wed, 21 Jul 2010 22:55:36 +0200</pubDate>
  <copyright></copyright>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Dotclear</generator>
  
    
  <item>
    <title>Python on OpenWrt Kamikaze 7.09</title>
    <link>http://www.usualcoding.eu/post/2008/07/14/Python-on-OpenWrt-Kamikaze-709</link>
    <guid isPermaLink="false">urn:md5:ba91840d46fa6d56aa2c9dd210ebad09</guid>
    <pubDate>Mon, 14 Jul 2008 18:32:00 +0200</pubDate>
    <dc:creator>Seb</dc:creator>
        <category>Hardware</category>
        <category>openwrt</category><category>python</category>    
    <description>    &lt;p&gt;It is not possible to install python on OpenWrt Kamikaze 7.09 because it depends on libreadline which is not available in the repositories for now.&lt;br /&gt;
There is a simple workaround:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Install the libreadline from 7.06 (brcm47xx-2.6 for mipsel and atheros-2.6 for mips)&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;   # ipkg install &lt;a href=&quot;http://downloads.openwrt.org/kamikaze/7.06/brcm47xx-2.6/packages/libreadline_5.1-1_mipsel.ipk&quot;&gt;http://downloads.openwrt.org/kamikaze/7.06/brcm47xx-2.6/packages/libreadline_5.1-1_mipsel.ipk&lt;/a&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Install python&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;   # ipkg install python&lt;/pre&gt;

&lt;p&gt;I tested this on the au1000 7.09 build. It should work on other mipsel and mips builds and on 7.07.&lt;/p&gt;</description>
    
    
    
          <comments>http://www.usualcoding.eu/post/2008/07/14/Python-on-OpenWrt-Kamikaze-709#comment-form</comments>
      <wfw:comment>http://www.usualcoding.eu/post/2008/07/14/Python-on-OpenWrt-Kamikaze-709#comment-form</wfw:comment>
      <wfw:commentRss>http://www.usualcoding.eu/feed/rss2/comments/11</wfw:commentRss>
      </item>
    
  <item>
    <title>NFQueue python bingings</title>
    <link>http://www.usualcoding.eu/post/2008/07/07/NFQueue-python-bingings</link>
    <guid isPermaLink="false">urn:md5:672a5772a4116e133c9f43b911284013</guid>
    <pubDate>Mon, 07 Jul 2008 14:04:00 +0200</pubDate>
    <dc:creator>Seb</dc:creator>
        <category>Patches</category>
        <category>code</category><category>netfilter</category><category>nfqueue</category><category>patches</category><category>python</category>    
    <description>    &lt;p&gt;A few month ago I needed python bindings for the nfqueue netfilter library (libnetfilter_queue).&lt;/p&gt;
&lt;p&gt;I was going to write them myself since I found none, but then I stumbled across &lt;a href=&quot;http://lists.netfilter.org/pipermail/netfilter-devel/2006-June/024672.html&quot;&gt;this&lt;/a&gt; on the netfilter mailing list.&lt;/p&gt;
&lt;p&gt;I like this &lt;a href=&quot;http://mathieu.geli.free.fr/code/nfqueue.tar.gz&quot;&gt;wrapper&lt;/a&gt; because it is simple and the code is clear. I was able to adapt my work to them very quickly.&lt;/p&gt;
&lt;p&gt;There were some little problems though.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;strong&gt;First &lt;/strong&gt;of all the unchanged code cannot be used in multithreaded programs (see &lt;a href=&quot;http://www.python.org/doc/api/threads.html&quot;&gt;http://www.python.org/doc/api/threads.html&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;So I wrote a little patch which adds the necessary Py_BEGIN_ALLOW_THREADS and a &quot;stop&quot; function to stop the queue.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The code can be found here:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;http://www.usualcoding.eu/public/nfqueue/nfqueue-multithreading.patch&quot;&gt;nfqueue-multithreading.patch&lt;br /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;br /&gt;The &lt;strong&gt;second &lt;/strong&gt;problem appears only on Linux &amp;gt;=2.6.23 (see &lt;a href=&quot;http://www.spinics.net/lists/netfilter/msg42063.html&quot;&gt;http://www.spinics.net/lists/netfilter/msg42063.html&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Here is the patch:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;http://www.usualcoding.eu/public/nfqueue/nfqueue-2.6.23-fix.patch&quot;&gt;nfqueue-2.6.23-fix.patch&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;Special thanks to Mathieu Geli for this wrapper, it helped me a lot and saved time in my work.&lt;br /&gt;&lt;br /&gt;By the way, I found new &lt;a href=&quot;http://software.inl.fr/trac/wiki/nfqueue-bindings&quot;&gt;nfqueue bindings based on SWIG&lt;/a&gt; that look nice. They are brand new, but I haven't tested them yet.&lt;br /&gt;&lt;br /&gt;Links:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;http://mathieu.geli.free.fr/code/nfqueue.tar.gz&quot;&gt;nfqueue.tar.gz&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://software.inl.fr/trac/wiki/nfqueue-bindings&quot;&gt;SWIG nfqueue-bindings&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description>
    
          <enclosure url="http://www.usualcoding.eu/public/nfqueue/nfqueue-multithreading.patch"
      length="1753" type="text/plain" />
          <enclosure url="http://www.usualcoding.eu/public/nfqueue/nfqueue-2.6.23-fix.patch"
      length="717" type="text/plain" />
    
    
          <comments>http://www.usualcoding.eu/post/2008/07/07/NFQueue-python-bingings#comment-form</comments>
      <wfw:comment>http://www.usualcoding.eu/post/2008/07/07/NFQueue-python-bingings#comment-form</wfw:comment>
      <wfw:commentRss>http://www.usualcoding.eu/feed/rss2/comments/9</wfw:commentRss>
      </item>
    
</channel>
</rss>