<?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>Jkx@home &#187; Python</title>
	<atom:link href="http://www.larsen-b.com/topics/python/feed" rel="self" type="application/rss+xml" />
	<link>http://www.larsen-b.com</link>
	<description>Titanium Exposé</description>
	<lastBuildDate>Wed, 20 May 2026 16:33:52 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5</generator>
		<item>
		<title>Howto to a delete lot of Zope/Plone/CPS User account ?</title>
		<link>http://www.larsen-b.com/Article/253.html</link>
		<comments>http://www.larsen-b.com/Article/253.html#comments</comments>
		<pubDate>Mon, 05 Feb 2007 15:44:03 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Zope]]></category>
		<category><![CDATA[cps]]></category>
		<category><![CDATA[plone]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[In a previous post, I study the way some spammers use plone user folder to spam my blog. But this time, it&#8217;s my turn. I host since a little time right now, a small CPS website for my work. And &#8230; <a href="http://www.larsen-b.com/Article/253.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>In a <a class="reference" href="http://www.larsen-b.com/Article/239.html">previous</a> post, I study the way some spammers use plone user folder to spam my blog. But this time, it&#8217;s my turn. I host since a little time right now, a small <a class="reference" href="http://www.cps-project.org/">CPS</a><br />
website for my work. And I discovered a lot of spammer user account on it.</p>
<p>The main issue, is that I haven&#8217;t unset the &#8220;joinable&#8221; flag, so everybody can create a account. By the way password are sent, spammers doesn&#8217;t manage to post stuff in the personnal area.</p>
<p>With 300 users, and only 4 valids, I need to find a way to clean the acl_user folder. Last <a class="reference" href="http://www.larsen-b.com/Article/249.html">time</a> I used twill, this works really great, so I decided to use the same stuff for Zope.</p>
<p>Here my little script:</p>
<pre class="literal-block">#!/usr/bin/python

LOGIN='foo'
PASSWORD='far'

LOGIN_URL='http://your_server/manage_main'
USER_URL='http://your_server/acl_users/manage_users'
GOOD_USERS = ['jkx','foobar']

import twill

def delUsers():
   twill.commands.go(USER_URL)
   form = twill.commands.showforms()[0]

   usernames = form.possible_items('names:list')
   for u in usernames:
      if u not in GOOD_USERS:
         twill.commands.formvalue(1,'names:list',u)

      twill.commands.showforms()
      twill.commands.submit(3)

def doLogin():
   twill.commands.go(LOGIN_URL)
   forms = twill.commands.showforms()

   twill.commands.formvalue(2,'__ac_name',LOGIN)
   twill.commands.formvalue(2,'__ac_password',PASSWORD)
   twill.commands.submit()

if __name__ =='__main__':
  doLogin()
  delUsers()</pre>
<p>This will drop all user account (not the ones in GOOD_USERS) ..</p>
]]></content:encoded>
			<wfw:commentRss>http://www.larsen-b.com/Article/253.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>I found the secret behind the Guido job at Google</title>
		<link>http://www.larsen-b.com/Article/246.html</link>
		<comments>http://www.larsen-b.com/Article/246.html#comments</comments>
		<pubDate>Sun, 26 Nov 2006 00:23:40 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[fun]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[This is a bit funny, but all is on the GoogleMasterPlan . As you can see to hire Guido, they decided to send spam. Hum, really happy to find Python on this stuff :)]]></description>
				<content:encoded><![CDATA[<p>This is a bit funny, but all is on the <a class="reference" href="http://picasaweb.google.com/cdibona/RIPGoogleMasterPlan/photo#4979945846336323602">GoogleMasterPlan</a> . As you can see  to hire Guido, they decided to send spam. Hum, really happy to find Python on this stuff :)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.larsen-b.com/Article/246.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Howto to spam-protect your python-based blog with bayesian filter.</title>
		<link>http://www.larsen-b.com/Article/244.html</link>
		<comments>http://www.larsen-b.com/Article/244.html#comments</comments>
		<pubDate>Fri, 17 Nov 2006 19:57:26 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[bayesian]]></category>
		<category><![CDATA[Blog]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[spam]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[As severall people, I run into issue with some spammer using my comment system to spam, and post backlinks. (Even using some funny stuffs) I &#8216;m already using a good email spam filter: SpamBayes, so I decided to test bayesian &#8230; <a href="http://www.larsen-b.com/Article/244.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>As severall people, I run into issue with some spammer using my comment system to spam, and post backlinks. (Even using some funny <a class="reference" href="http://www.larsen-b.com/Article/239.html">stuffs</a>)</p>
<p>I &#8216;m already using a good email spam filter: <a class="reference" href="http://www.larsen-b.com/Article/112.html">SpamBayes</a>, so I decided to test bayesian filtering for the spam on this blog too.</p>
<p>I decided to give <a class="reference" href="http://divmod.org/trac/">Reverend</a> a try:</p>
<pre class="literal-block">from reverend.thomas import Bayes

SPAM_DB='spam.bayes'
guesser = Bayes()

# load the spam DB
try:
    guesser.load(SPAM_DB)
except IOError:
    print "Creating a new spam filter database"
    guesser.save(SPAM_DB)

def train_spam(text):
    guesser.train('spam',text)
    guesser.save(SPAM_DB)

def train_ham(text):
    guesser.train('ham',text)
    guesser.save(SPAM_DB)

# try to guess the spam / ham ratio of a text
def guess(text):
    spam = 0
    ham = 0
    value = guesser.guess(text)
    for o in value:
        if o[0] == 'ham': ham = o[1]
        if o[0] == 'spam': spam = o[1]
    return (ham,spam)</pre>
<p>Small, and really simple module no ? The next step, simply add a &#8216;spam&#8217; and &#8216;ham&#8217; attributes on your comment post. And add two methods to train the comment as a spam or a ham.. And of course, only display comments which have a good ratio ( &gt;1) ham/spam. This took me about 1 hour to implement&#8230;</p>
<p>After a week, of train, this is working very fine, not a single false positive, and it filter every spam since the first trains. As I get around 20 spams post per day, this is quite a good news ;)</p>
<p><strong>Enjoy Bayesian ?</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.larsen-b.com/Article/244.html/feed</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Python powered Tux ?</title>
		<link>http://www.larsen-b.com/Article/235.html</link>
		<comments>http://www.larsen-b.com/Article/235.html#comments</comments>
		<pubDate>Wed, 09 Aug 2006 23:00:55 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[gadget]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[usb]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Not really, but this nice Tux droid, can be pluged in USB, and the commands are sent via a Python DBUS binding. Hum a stupid question, can we use the Python USB API directly ? With time, Python really became &#8230; <a href="http://www.larsen-b.com/Article/235.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Not really, but <a class="reference" href="http://www2.tux-is-alive.com/wiki/Applications">this nice Tux</a> droid, can be pluged in USB, and the commands are sent via a <a class="reference" href="http://www.freedesktop.org/wiki/Software/dbus#head-e2844d090b2d64ddc5bdff51b624d1e98de56ae3">Python DBUS</a> binding. Hum a stupid question, can we use the Python USB API directly ?</p>
<p>With time, Python really became a powerfull tool for hardware hackers :) That&#8217;s perhaps why I like it so much ?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.larsen-b.com/Article/235.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Python blackhat tools ?</title>
		<link>http://www.larsen-b.com/Article/222.html</link>
		<comments>http://www.larsen-b.com/Article/222.html#comments</comments>
		<pubDate>Wed, 29 Mar 2006 15:53:21 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[skype]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Yesterday, somebody send me a link to some really interesting slides: Silver Needle in the Skype. This really impress me, how much energy Skype spent to hide his code, and protect their buisness. But on the other side, the work &#8230; <a href="http://www.larsen-b.com/Article/222.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Yesterday, somebody send me a link to some really interesting slides: <a class="reference" href="http://www.blackhat.com/presentations/bh-europe-06/bh-eu-06-biondi/bh-eu-06-biondi-up.pdf">Silver Needle in the Skype</a>. This really impress me, how much energy Skype spent to hide his code, and protect their buisness. But on the other side, the work done to dissect the binary and the protocols is even more surprising. (What a great job !!)</p>
<p>I have to admit that I used Python for quite everything, and that I&#8217;ve ever done some strange stuff with it (a IPTV packet scrapper, firewall shapping .. )  but this guys<br />
pushed the limit far beyong from what I&#8217;m seeing like usual python use. And the best part: they wrote some powerfull tools ( and use them to &#8220;debug skype&#8221;), and publish them.</p>
<p>Look at <a class="reference" href="http://www.secdev.org/projects/">here</a>, you will find a bunch of really backhat python tools written by the <a class="reference" href="http://www.secdev.org/">Secdev team</a>.</p>
<p>/Enjoy</p>
]]></content:encoded>
			<wfw:commentRss>http://www.larsen-b.com/Article/222.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Playing with Realtime with Python</title>
		<link>http://www.larsen-b.com/Article/221.html</link>
		<comments>http://www.larsen-b.com/Article/221.html#comments</comments>
		<pubDate>Tue, 24 Jan 2006 08:54:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[rtc]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[For a little app, I need to send stream over UDP at a fixed rate. I have done severals tests w/ some buffers and sleep(), but I can&#8217;t achieve the desired speed. Mainly because sleep() doesn&#8217;t provide a stable enought &#8230; <a href="http://www.larsen-b.com/Article/221.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>For a little app, I need to send stream over UDP at a fixed rate. I have done severals tests w/ some buffers and sleep(), but I can&#8217;t achieve the desired speed. Mainly because sleep() doesn&#8217;t provide a stable enought result.</p>
<p>I decided to look at this a little deeply, and decided to use <strong>/dev/rtc</strong> to do the trick. Here a little example of the stuff.</p>
<pre class="literal-block">from  fcntl import ioctl
import os, time

# some linux kernel header
RTC_IRQP_SET = 1074032652
RTC_PIE_ON =  28677
RTC_PIE_OFF = 28678

# open the realtime clock
f = open ("/dev/rtc", "r")
fd = f.fileno()

# 2048 freq
ioctl(fd,RTC_IRQP_SET,2048)
ioctl(fd,RTC_PIE_ON,0)

t0 = time.time()
interupt = 0

# the read will block until the next interrupt.
while interupt &lt; 1000 :
    os.read(fd,4)  # 4 = size of double
    interupt = interupt + 1

delta = time.time() - t0
print interupt / delta

# drop the scheduler
ioctl(fd,RTC_PIE_OFF,0)</pre>
<p>This is quite accurate enought, the only issue is that I&#8217;m unable to call the <em>sched_setscheduler()</em> from Python right now. So, if the host isn&#8217;t loaded I get the 2048 interrupts.. but it can be less :(</p>
<p><strong>Update</strong>:<br />
The <em>sched_setscheduler</em> can be done w/ a simple pyrex extension:</p>
<pre class="literal-block">cdef extern from "sched.h":
struct sched_param:
int sched_priority
int sched_setscheduler(int pid, int policy,sched_param  *p)

SCHED_FIFO = 1

def switchRTCPriority(nb):
cdef sched_param sp
sp.sched_priority = nb
sched_setscheduler (0,SCHED_FIFO , &amp;sp);</pre>
<p>After this quick Pyrex hack, I now have a accurate realtime interrupt in Python ;)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.larsen-b.com/Article/221.html/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Playing with binary in Python</title>
		<link>http://www.larsen-b.com/Article/220.html</link>
		<comments>http://www.larsen-b.com/Article/220.html#comments</comments>
		<pubDate>Thu, 15 Dec 2005 10:05:47 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[avr]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[While debuging an AVR microcontroller, you need to play with bits. After playing with my calculator I decided to find another way to decode bin/hex etc .. I found a good recipe on ASPN. Now, this is a little reminder &#8230; <a href="http://www.larsen-b.com/Article/220.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>While debuging an <a class="reference" href="http://www.atmel.com/products/AVR/">AVR</a> microcontroller, you need to play with bits. After playing with my calculator I decided to find another way to decode bin/hex etc ..  I found a good <a class="reference" href="http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/219300">recipe</a> on ASPN.</p>
<p>Now, this is a little reminder for people (like me) which doesn&#8217;t read binary op fluently.</p>
<pre class="literal-block"># This will off the bits according to value
x &amp;= ~(value) 

# Here a little reverse: This will set bits on according to value
x |= value</pre>
<p>Have fun w/ bits  :)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.larsen-b.com/Article/220.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Ouch: Plone 2.0 vs Plone 2.1</title>
		<link>http://www.larsen-b.com/Article/217.html</link>
		<comments>http://www.larsen-b.com/Article/217.html#comments</comments>
		<pubDate>Tue, 27 Sep 2005 14:47:10 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Zope]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[I run into a little test of Plone 2.1 today. And the whole stuff, seems to be slower than Plone 2.0.5. I decided to do a little benchmark, and yes Plone 2.1 seems to be really slower.. Plone 2.0.5 (python &#8230; <a href="http://www.larsen-b.com/Article/217.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>I run into a little test of <a class="reference" href="http://www.plone.org">Plone</a> 2.1 today. And the whole stuff, seems to be slower than Plone 2.0.5. I decided to do a little benchmark, and yes Plone 2.1 seems to be really slower..</p>
<p><em>Plone 2.0.5</em> (python 2.3.4)</p>
<pre class="literal-block">Total transferred:      239130 bytes
HTML transferred:       234620 bytes
Requests per second:    5.52 [#/sec] (mean)
Time per request:       181.261 [ms] (mean)
Time per request:       181.261 [ms] (mean, across all concurrent requests)
Transfer rate:          128.54 [Kbytes/sec] received</pre>
<p><em>Plone 2.1</em> (python 2.3.5)</p>
<pre class="literal-block">Total transferred:      240740 bytes
HTML transferred:       237440 bytes
Requests per second:    3.54 [#/sec] (mean)
Time per request:       282.476 [ms] (mean)
Time per request:       282.476 [ms] (mean, across all concurrent requests)
Transfer rate:          83.19 [Kbytes/sec] received</pre>
<p>Grr, here is two point to read:</p>
<ul class="simple">
<li>The 2.1 version is really slower look at the transfer rate..</li>
<li>But this is astomish <strong>slow</strong></li>
</ul>
<p>The bench was done on:</p>
<ul class="simple">
<li>pure zope httpd (no apache or squid frontend)</li>
<li>without debug enable</li>
<li>with default HTTPCache and RAMCache enable (default install setting)</li>
<li>a dual Xeon at 2.6Ghz with 1Go of RAM ! (I know python only use 1 CPU but !!!)</li>
</ul>
<p>I first think my setup is buggy, but no.. nobody with a good CMS in stock ?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.larsen-b.com/Article/217.html/feed</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Python on Rails: The bazzar</title>
		<link>http://www.larsen-b.com/Article/216.html</link>
		<comments>http://www.larsen-b.com/Article/216.html#comments</comments>
		<pubDate>Sat, 17 Sep 2005 22:51:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[paste]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[ror]]></category>
		<category><![CDATA[turbogears]]></category>
		<category><![CDATA[Zope]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Everybody know Ruby on Rails right now. There is a lot of post all over the web, showing us the new latest new web programming style. This is a little funny because in a past life (4 years ago), I &#8230; <a href="http://www.larsen-b.com/Article/216.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Everybody know <a class="reference" href="http://www.rubyonrails.org/">Ruby on Rails</a> right now. There is a lot of post all over the web, showing us the new latest new web programming style. This is a little funny because in a past life (4 years ago), I worked on something quite similar for Zope, name <a class="reference" href="http://modeling.sf.net">ZModeling</a>. And I guess a lot of people has done the same, by generating the html from a data model (It tooks me about 1hours to do that for my latest website). That&#8217;s it and this is the latest hype stuff. IT loves hype !</p>
<p>Anyway, as this become usual, (grrr) there is a bunch of projects that try to clone the rails features. The well know python proverb can be used:<br />
<strong>Divide to loose</strong></p>
<p>Here &#8216;s a little list:</p>
<div id="django" class="section">
<h1><a name="django">Django</a></h1>
<p><a class="reference" href="http://www.djangoproject.com/documentation/overview/">Django</a> is the total new one, it&#8217;s written from scratch, and doesn&#8217;t re-use anything.</p>
<ul class="simple">
<li>it use mod_python for apache integration (no SCGI for lighttpd ??)</li>
<li>custom ORM</li>
<li>custom template engine (why not another one !!)</li>
</ul>
<p>This one has a lot of good comments, and a lot of people see in this stuff a Zope killer app.. or something like that but ..</p>
</div>
<div id="subway" class="section">
<h1><a name="subway">Subway</a></h1>
<p><a class="reference" href="http://subway.python-hosting.com/">Subway</a> was born just after Ruby on rails, and is the direct competitor.</p>
<ul class="simple">
<li>CherryPy: stable, simple and robust HTTP framework</li>
<li>SQLObject: the world famous ORM for Py</li>
<li>Cheetah: a plain old fashion template engine.</li>
</ul>
<p>This is nothing more a app skelton generator, with a little wraps around the whole stuffs, nothing magic, but simple .. perhaps too simple ?</p>
</div>
<div id="turbogears" class="section">
<h1><a name="turbogears">TurboGears</a></h1>
<p><a class="reference" href="http://www.turbogears.org/">TurboGears</a> is a the latest one I think</p>
<ul class="simple">
<li>CherryPy</li>
<li>SQLObject ORM</li>
<li>Kid template: a simple ZPT like</li>
<li>A powerfull Ajax toolkit.</li>
</ul>
<p>The API is a bit Frankhein right now I think (I don&#8217;t like the raise CherryPy in the middle), and the templating is not powefull enought. But it&#8217;s really interesting (meanly the Ajax API).</p>
</div>
<div id="paste" class="section">
<h1><a name="paste">Paste</a></h1>
<p>Paste is something a bit different of rails, It has a more large framework</p>
<ul class="simple">
<li>WSGI</li>
<li>SQLObject ORM</li>
<li>ZPT: The powerfull Zope Page Templates</li>
</ul>
</div>
<div id="so-now-which-is-the-best" class="section">
<h1><a name="so-now-which-is-the-best">So now, which is the best ?</a></h1>
<p>Perhaps none right now:</p>
<ul class="simple">
<li>Django use (for me) too much indoor product, I think there is a lot goods frameworks for python right now, and re-writting a ORM expose the project to a some strange bugs, or missing features, or wrong design (the meta api is freak) . same for template engine.</li>
<li>Subway and TurboGears are really quite the same product, and they are lacking of some features like the admin page for objects. I prefer TurboGears meanly for the Ajax toolkit.</li>
<li>Paste, is as usual a very well written stuff from Ian. The API is clear, and tools are well known. But I think the framework take too much place. I mean force you too use it&#8217;s configuration stuff, and other WSGI server.</li>
</ul>
<p>So perhaps, you can pick just one of this, as they&#8217;re all looking close:</p>
<ul class="simple">
<li>If you want to discover something really different: Django</li>
<li>If you want something closer to rails: TurboGears</li>
<li>If you like the servlet and threads choose: Paste ..</li>
</ul>
<p>But take care that the framework you choose feet with:</p>
<ul class="simple">
<li>your way of web programming (servlet vs controller + template)</li>
<li>the project load (I mean mod_python is awfull to debug but provide some very good performance)</li>
</ul>
<p>Anyways, the choice is really hard because it&#8217;s time to choose right now, and I believe that some frameworks will die sooner than others.. Django seems to be the next big python project, but some people share my opinion about :&#8221; I don&#8217;t want to learn another ORM !&#8221;</p>
<p>But, beside there is a lot of frameworks, they &#8216;re loosing the main goal: <strong>Using a good framework is a good stuff. But using good products is better</strong>. They all miss the component model. HTTP + ORM + Template engine = Web Framework, but for a application framework you need a little more. Some stuffs have been done on Webware, and Quixote about this, but it looks like people designing framework never look at the past, and keep on going building the same stuff over and over.</p>
<p>What we need now, is a application framework. Something we can use to build website not webapp. Clients are now asking for : &#8220;I need something to post articles + a forum + a wiki + ..&#8221; That&#8217;s too much for a quick answer like: &#8220;Ok I gonna use this web frameworks&#8221;. On the PHP scene right now, you have some great products that tend to share some component, like user rights, templating .. and this is really a bad news for Python users, because the only stuff we have to fight against this is Zope. And it&#8217;s getting even worst since right now, most products need Plone and all the bloat it&#8217;s about.</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.larsen-b.com/Article/216.html/feed</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
		<item>
		<title>Howto to Talk with GoogleTalk in Python</title>
		<link>http://www.larsen-b.com/Article/214.html</link>
		<comments>http://www.larsen-b.com/Article/214.html#comments</comments>
		<pubDate>Tue, 30 Aug 2005 22:00:18 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[jabber]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[xmpp]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[I guess everybody know GoogleTalk right now. Linux users like me knows that it &#8216;s only a Jabber server with SIP extension. Like a lot of people seems to use this, I decided to switch from MSN(suxTm) to this Jabber &#8230; <a href="http://www.larsen-b.com/Article/214.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>I guess everybody know GoogleTalk right now. Linux users like me knows that it &#8216;s only a <a class="reference" href="http://www.jabber.org">Jabber</a> server with SIP extension. Like a lot of people seems to use this, I decided to switch from MSN(suxTm) to this Jabber server, beside it lacks a lot of Jabber features (like offline messaging )</p>
<p>But, how can I send a message to my Gmail Talk in less 10 lines of code. I decided to look at <a class="reference" href="http://xmpppy.sourceforge.net/">xmpppy</a> .. Ok I get a strange issue w/ secure login ..</p>
<p>As I already use <a class="reference" href="http://gajim.org/">gajim</a>, I decided to look at this code.. Hum, look strange it has the same xmpp module, with the same API, but this one is working.</p>
<pre class="literal-block">import xmpp

login = 'Your.Login' # @gmail.com
pwd   = 'YourPassword'

cnx = xmpp.Client('gmail.com')
cnx.connect( server=('talk.google.com',5223) )

cnx.auth(login,pwd, 'botty')

cnx.send( xmpp.Message( "YourFriend@gmail.com" ,"Hello World form Python" ) )</pre>
<p>As you can see this is small and simple :) The only issue is to find the right module, and hope the <a class="reference" href="http://xmpppy.sourceforge.net/">xmpppy</a> will fix that soon.</p>
<p>(In fact <a class="reference" href="http://gajim.org/">gajim</a> team seems to fork the xmpp code due to lack of support. This bug already exists in the <a class="reference" href="http://xmpppy.sourceforge.net/">xmpppy</a> bug list )</p>
]]></content:encoded>
			<wfw:commentRss>http://www.larsen-b.com/Article/214.html/feed</wfw:commentRss>
		<slash:comments>22</slash:comments>
		</item>
	</channel>
</rss>
