<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress.com" -->
<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/"
	>

<channel>
	<title>python &amp;laquo; WordPress.com Tag Feed</title>
	<link>http://wordpress.com/tag/python/</link>
	<description>Feed of posts on WordPress.com tagged "python"</description>
	<pubDate>Sun, 20 Jul 2008 12:04:19 +0000</pubDate>

	<generator>http://wordpress.com/tags/</generator>
	<language>en</language>

<item>
<title><![CDATA[PyHP: perchè Python è meglio di PHP]]></title>
<link>http://markoblog.wordpress.com/?p=1719</link>
<pubDate>Sun, 20 Jul 2008 10:36:50 +0000</pubDate>
<dc:creator>markostyle</dc:creator>
<guid>http://markoblog.wordpress.com/?p=1719</guid>
<description><![CDATA[
Ci segnalano il rilascio della prima versione alpha di PyHP. Dietro questo nome un po’ criptico s]]></description>
<content:encoded><![CDATA[<p><a href="http://markoblog.files.wordpress.com/2008/07/pyphp.jpg"><img class="alignnone size-full wp-image-1720" src="http://markoblog.wordpress.com/files/2008/07/pyphp.jpg" alt="" width="432" height="126" /></a></p>
<p>Ci segnalano il rilascio della prima versione alpha di <a href="http://www.pyhp.org/">PyHP</a>. Dietro questo nome un po’ criptico si cela un modulo per Apache che permette di utilizzare Python come preprocessore delle pagine HTML, in maniera analoga a quanto avviene con PHP.</p>
<p>Poco convinti sulla bontà di Python (in ambito web)? Sulla pagina del progetto sono ben in evidenza i suoi punti di forza e, soprattutto, i vantaggi rispetto PHP.</p>
<p>Il mondo è bello perché vario, tanto di più se si tratta di quello del software libero / aperto.</p>
<p style="text-align:right;">[via: ossblog.it]</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[japanese drilling on maemo III]]></title>
<link>http://kmerenkov.wordpress.com/?p=48</link>
<pubDate>Sun, 20 Jul 2008 06:38:37 +0000</pubDate>
<dc:creator>kmerenkov</dc:creator>
<guid>http://kmerenkov.wordpress.com/?p=48</guid>
<description><![CDATA[Changed my &#8220;puzzle&#8221; program (I still don&#8217;t know how this app is called).
Instead o]]></description>
<content:encoded><![CDATA[<p>Changed my "puzzle" program (I still don't know how this app is called).<br />
Instead of describing changes let me re-introduce you to it:</p>
<p>When you start the program, you are presented with such UI:<br />
<a href="http://www.flickr.com/photos/kmerenkov/2683935589/" title="default by kmerenkov, on Flickr"><img src="http://farm4.static.flickr.com/3128/2683935589_6237452074.jpg" width="500" height="300" alt="default" /></a></p>
<p>Left side is occupied by a word you have to type in <a href="http://en.wikipedia.org/wiki/Kana">kana</a> and its translation + two buttons I will describe later.</p>
<p><a href="http://www.flickr.com/photos/kmerenkov/2683935593/" title="typing by kmerenkov, on Flickr"><img src="http://farm4.static.flickr.com/3128/2683935593_58c4e3ced9.jpg" width="500" height="300" alt="typing" /></a></p>
<p>Right side is occupied by buttons with kana characters on them and acts just as on-screen keyboard, you tap on buttons - you type text. Only keys required to enter correct answer are shown. Thus said, there may be two buttons, there may be ten buttons.</p>
<p><a href="http://www.flickr.com/photos/kmerenkov/2683935587/" title="keyboard does not fit by kmerenkov, on Flickr"><img src="http://farm4.static.flickr.com/3035/2683935587_f9e216efdf.jpg" width="500" height="300" alt="keyboard does not fit" /></a></p>
<p>If there is too much buttons, they are split to more than one columns.<br />
<b>BIG FAT NOTE</b>: the screenshot above is obsolete as there is no "reset" button + there are non-unique keys on on-screen keyboard, but still, code splitting keyboard by columns still lives in today's code.</p>
<p>Now, to the buttons on the left side:<br />
"Reset" - it clears what you typed. This is useful if you accidentally (or not) clicked wrong button.<br />
"Check" - checks correctness of your answer.</p>
<p><a href="http://www.flickr.com/photos/kmerenkov/2683935599/" title="checking by kmerenkov, on Flickr"><img src="http://farm4.static.flickr.com/3246/2683935599_50eecde7bf.jpg" width="500" height="300" alt="checking" /></a></p>
<p>All these changes helped me to:<br />
 * delete a lot of lines of code<br />
 * make you click on screen less times</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Also wxpython]]></title>
<link>http://servuzmaxguat.wordpress.com/?p=142</link>
<pubDate>Fri, 18 Jul 2008 20:43:21 +0000</pubDate>
<dc:creator>servuzmaxguat</dc:creator>
<guid>http://servuzmaxguat.wordpress.com/?p=142</guid>
<description><![CDATA[also das gui ding meiner wahl - plattform unabhängig und so is wx python. das was ich brauch funkti]]></description>
<content:encoded><![CDATA[<p>also das gui ding meiner wahl - plattform unabhängig und so is wx python. das was ich brauch funktioniert - glaub ich. tkinter vergessen. wxpython rockt das haus.</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Handbag of The Day]]></title>
<link>http://broccolicity.wordpress.com/?p=3615</link>
<pubDate>Fri, 18 Jul 2008 17:33:04 +0000</pubDate>
<dc:creator>broccolicity</dc:creator>
<guid>http://broccolicity.wordpress.com/?p=3615</guid>
<description><![CDATA[
I guess the way to go this summer ladies is to cope u a python handbag this summer.Above is the Zag]]></description>
<content:encoded><![CDATA[<p><a href="http://broccolicity.files.wordpress.com/2008/07/zagliani-python-z-bag.jpg"><img class="alignnone size-full wp-image-3616" src="http://broccolicity.wordpress.com/files/2008/07/zagliani-python-z-bag.jpg" alt="" width="397" height="486" /></a></p>
<p>I guess the way to go this summer ladies is to cope u a python handbag this summer.Above is the <strong>Zagliani Python Z Bag</strong> which contains about a thousand times more sick ass pewter snakeskin surface area, plus you could buy it and wear it every day for the rest of your life, and that would make every murda mami happy.Damage:$4,290</p>
<p><a href="http://broccolicity.files.wordpress.com/2008/07/gucci-jockey-python-bag1.jpg"><img class="alignnone size-full wp-image-3618" src="http://broccolicity.wordpress.com/files/2008/07/gucci-jockey-python-bag1.jpg" alt="" width="402" height="387" /></a></p>
<p>Next we have The <strong>Gucci Jockey Python Bag</strong> meets all of your handbag needs; exotic skin, easy-to-wear shape, casual style. It is as if the Gucci Gods know how to tempt and have gone into your head, jumped in your dreams, and placed the perfect black bag in front of you....Damage:$3,295.</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Buildbot and py.test exit status]]></title>
<link>http://seeknuance.wordpress.com/?p=57</link>
<pubDate>Fri, 18 Jul 2008 16:07:23 +0000</pubDate>
<dc:creator>John</dc:creator>
<guid>http://seeknuance.wordpress.com/?p=57</guid>
<description><![CDATA[Buildbot is a great continuous integration tool, and PyTest, aka py.test, is a great unit testing t]]></description>
<content:encoded><![CDATA[<p><a href="http://buildbot.net/trac" target="_self">Buildbot</a> is a great <a href="http://en.wikipedia.org/wiki/Continuous_Integration" target="_self">continuous integration</a> tool, and <a href="http://wiki.python.org/moin/PyTest" target="_self">PyTest</a>, aka py.test, is a great unit testing tool.</p>
<p>But there's an impedance mismatch between them.<!--more--></p>
<p>In Buildbot, a ShellCommand is deemed to have failed if it returns a non-zero <a href="http://en.wikipedia.org/wiki/Exit_status" target="_self">exit status</a>, and succeeded if it returns a zero exit status.</p>
<p>Py.test <em>always</em> returns a zero status.  I guess their philosophy is: Py.test didn’t crash, so it was “successful,” and the exit status should be 0. So, when py.test returns a 0 status, Buildbot deems the ShellCommand successful — and therefore, the build “succeeded,” no build failure email is generated, and the buildbot waterfall remains green.</p>
<p>You’d think that py.test would have a "––returnnonzerostatusonfailure” switch.  But it doesn’t.</p>
<p><a href="http://osdir.com/ml/python.buildbot.devel/2005-05/msg00032.html" target="_self">I found evidence on a mail archive that this problem has been around since 2005.</a></p>
<p>Am I missing something obvious, and if not, what’s the generally accepted way to work around this problem?</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[eumerate(file) v. file.readlines()]]></title>
<link>http://openil.wordpress.com/?p=323</link>
<pubDate>Fri, 18 Jul 2008 10:16:28 +0000</pubDate>
<dc:creator>वीर</dc:creator>
<guid>http://openil.wordpress.com/?p=323</guid>
<description><![CDATA[จาก plynoi ถามมาว่า enumerate(file) มันดีกว่าใช้ file.]]></description>
<content:encoded><![CDATA[<p>จาก plynoi ถามมาว่า enumerate(file) มันดีกว่าใช้ file.readlines() อย่างไร. plynoi ตอบเองว่าได้ index มาด้วย. แต่มันก็น่าจะมีอะไรมากกว่านั้นหน่อยผมเลยลองทำ 2 โปรแกรมนี้.</p>
<p>enum1.py:</p>
<p>[sourcecode language='javascript']import sys<br />
filename = sys.argv[1]<br />
f = open(filename)<br />
print f.readlines()[0]<br />
f.close()[/sourcecode]</p>
<p>enum2.py:</p>
<p>[sourcecode language='javascript']import sys<br />
filename = sys.argv[1]<br />
f = open(filename)<br />
for i, line in enumerate(f):<br />
    print i, line<br />
    break<br />
f.close()[/sourcecode]</p>
<p>ทั้ง 2 โปรแกรม print บรรทัดแรกอย่างเดียวนะครับ</p>
<pre>veer@veer-laptop:wordalign$ time python <strong>enum1.py</strong> tha_cut_u8.txt &#62; /dev/null
real	0m0.076s
user	0m0.044s
sys	0m0.032s

$ time python <strong>enum2.py</strong> tha_cut_u8.txt &#62; /dev/null
real	0m0.021s
user	0m0.012s
sys	0m0.008s</pre>
<p>enum2.py เร็วกว่ามาก ... น่าจะเป็นเพราะว่า enum2.py อ่านทีละบรรทัดแล้วก็มาทำอะไรต่ออะไรใน for-loop เลย. แต่ enum1.py อ่านทุกอย่างมาเก็บใน list แล้วค่อย มาทำอะไรใน list อีกที ... ถ้าเป็นแบบที่เดาจริง มันจะประหยัด memory กว่าถ้าใช้ enumerate. ประโยชน์อีกอย่างหนึงถ้าทำอะไรแบบ interactive ดูผลทีละบรรทัด ใช้ enumerate ก็น่าจะได้ดูไวกว่า.</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[[vim] python code auto complete]]></title>
<link>http://xxxd.wordpress.com/?p=178</link>
<pubDate>Fri, 18 Jul 2008 09:52:42 +0000</pubDate>
<dc:creator>ytshen</dc:creator>
<guid>http://xxxd.wordpress.com/?p=178</guid>
<description><![CDATA[ auto complete plugin 
 indent 
It&#8217;s quite nice when I write python code :p
]]></description>
<content:encoded><![CDATA[<p><a href="http://www.vim.org/scripts/script.php?script_id=850"> auto complete plugin </a><br />
<a href="http://www.vim.org/scripts/script.php?script_id=974"> indent </a><br />
It's quite nice when I write python code :p</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Gobby(Multi Cursor File Editing) oder so ähnlich :D]]></title>
<link>http://seufz.wordpress.com/?p=118</link>
<pubDate>Fri, 18 Jul 2008 08:38:15 +0000</pubDate>
<dc:creator>seufz</dc:creator>
<guid>http://seufz.wordpress.com/?p=118</guid>
<description><![CDATA[Seit einigen Tagen spielen CrackPod und ich gleichzeitig zusammen an PythonDateien herum. Ich hab au]]></description>
<content:encoded><![CDATA[<p>Seit einigen Tagen spielen <a href="http://crackpod.bplaced.net">CrackPod</a> und ich gleichzeitig zusammen an PythonDateien herum. Ich hab auch noch nicht verstanden wie das genau funktioniert. Aber : Es funktioniert und es macht riesen Spaß!<br />
Hier mal der Link zu Gobby: <a href="http://gobby.0x539.de/trac/">http://gobby.0x539.de/trac/</a></p>
<blockquote><p>Gobby is a free collaborative editor supporting multiple documents in one session and a multi-user chat. It runs on Microsoft Windows, Mac OS X, Linux and other Unix-like platforms.</p></blockquote>
<p>Vor allem schreitet mein Lernprozess viel schneller voran als mit dem PDF :)</p>
<p><a href="http://upload.wikimedia.org/wikipedia/commons/0/0c/Gobby-0.4.0-dev-linux.png"><img class="alignnone" src="http://upload.wikimedia.org/wikipedia/commons/thumb/0/0c/Gobby-0.4.0-dev-linux.png/250px-Gobby-0.4.0-dev-linux.png" alt="" width="250" height="200" /></a></p>
<p>Das ganze funktioniert über einen offenen Port im Router und einer der Beteiligten muss den ganzen Spaß quasi "hosten". Mithilfe eines Passworts lässt sich dann die Session betreten und mehrere Dokumente bearbeiten/anlegen.</p>
<p>Dadurch sind wir dann auf die Idee gekommen uns unsere eigene kleine Welt zusammenzubasteln ;) Nur aus Spaß an der Freude und damit ich endlich lerne besser mit Python umzugehen. :)</p>
<p>Das ganze sieht in etwa so aus: (Nur ein ganz kleiner Entwurf :P )</p>
<p>[sourcecode language='python']<br />
#!/usr/bin/python</p>
<p>class Person:<br />
	bevoelkerung = 0<br />
	def __init__(self, name, url):<br />
		self.name = name<br />
		self.url = url<br />
		print'%s Wird geboren' % self.name<br />
		Person.bevoelkerung +=1</p>
<p>	def blog(self):<br />
		print 'Visit me on %s'  % self.url </p>
<p>	def __del__(self):<br />
		print '%s ist tot!' % self.name<br />
		Person.bevoelkerung -=1</p>
<p>		if Person.bevoelkerung == 0:<br />
			print'ich bin der letzte'<br />
		else:<br />
			print'Es gibt noch %d Leute.' % Person.bevoelkerung</p>
<p>	def sagHallo(self):<br />
		print 'Servus ich bin %s' % self.name<br />
	def wieViele(self):<br />
		if Person.bevoelkerung == 1:<br />
			print 'ich bin ganz alleine hier*angst*'<br />
		else:<br />
			print 'Es leben hier %d Leute' % Person.bevoelkerung</p>
<p>noqqe = Person('noqqe', 'noqqe.de' )<br />
noqqe.blog()<br />
noqqe.sagHallo()<br />
noqqe.wieViele()<br />
crackpod = Person('crackpod', 'crackpod.bplaced.net' )<br />
crackpod.sagHallo()<br />
crackpod.blog()<br />
crackpod.wieViele()<br />
noqqe.sagHallo()<br />
noqqe.wieViele()<br />
Julie = Person('Julie', 'julie.hat-gar-keine-homepage.de' )<br />
Julie.sagHallo()<br />
Julie.blog()<br />
Julie.wieViele()<br />
noqqe.__del__()<br />
noqqe.wieViele()<br />
[/sourcecode]</p>
<p>oder wie immer hier : <a href="http://paste.pocoo.org/show/79759/">http://paste.pocoo.org/show/79759/</a></p>
<p>Ausgabe sieht dann ungefähr wie folgt aus:<br />
<code>noqqe Wird geboren<br />
Visit me on noqqe.de<br />
Servus ich bin noqqe<br />
ich bin ganz alleine hier*angst*<br />
crackpod Wird geboren<br />
Servus ich bin crackpod<br />
Visit me on crackpod.bplaced.net<br />
Es leben hier 2 Leute<br />
Servus ich bin noqqe<br />
Es leben hier 2 Leute<br />
Julie Wird geboren<br />
Servus ich bin Julie<br />
Visit me on julie.hat-gar-keine-homepage.de<br />
Es leben hier 3 Leute<br />
noqqe ist tot!<br />
Es gibt noch 2 Leute.<br />
Julie ist tot!<br />
Es gibt noch 1 Leute.<br />
ich bin der letzte<br />
crackpod ist tot!</code></p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[The longest twenty days of my life comes to an end...]]></title>
<link>http://lalithsuresh.wordpress.com/?p=41</link>
<pubDate>Fri, 18 Jul 2008 07:30:24 +0000</pubDate>
<dc:creator>lalithsuresh</dc:creator>
<guid>http://lalithsuresh.wordpress.com/?p=41</guid>
<description><![CDATA[In two days from now, I&#8217;ll be on a train to Jaipur after long last. While anyone else would be]]></description>
<content:encoded><![CDATA[<p>In two days from now, I'll be on a train to Jaipur after long last. While anyone else would be sad that they could spend only twenty days at home, I beg to differ. I for one, am a person who doesn't like to remain 'idle'. I was advised time and again to just sit back and relax through whatever little is left of my vacation. Time not only flies when you're having fun, it also soars when you're busy with something or the other. In all other cases, it's just as fast as a cheetah who's been run over by an 18 wheeler and then eaten up by a pack of vultures. Anyway, the point is, I've never experienced boredom of this order before. Barring a day or two, my friends were never around and neither were my cousins. My mom insisted I go visit all those old people (her uncles and aunts) who live in remote corners of the planet. But visiting old people ain't exactly my idea of a fun filled rollercoaster ride of a vacation you know? Yeah, call me a brat. See if I care...</p>
<p>To add <a title="Indo-US nuclear deal" href="http://www.financialexpress.com/news/Highlights-of-IndoUS-nuclear-deal/208405/" target="_blank">enriched nuclear fuel</a> to the fire, I couldn't work on my laptop. Why? Because of all the things I'd forgotten to do back from college, I forgot to configure my Debian for using the dial-up connection I have at home. And since I didn't have a pen drive to transfer content between my PC and my laptop, I was pretty much stuck. And if you didn't know, trying to work/hack on Windows is as good as trying to dance without feet. When the <a title="Google Code Jam" href="http://code.google.com/codejam/" target="_blank">Google Code Jam</a> happened yesterday, I couldn't submit my code because of this. I'd successfully solved one of the problems which was enough for me to qualify but darn.</p>
<p>On the bright side, I learnt <a title="Python" href="http://www.python.org" target="_blank">python</a> through that problem. I ain't that good a programmer and I'm still learning. As of now, I'm pretty much in love with python and this could be the one language I've been looking for since quite a while. An elegant combination of simplicity (near english like syntax) and power (very good built in datatypes and methods) is exactly what the doctor ordered in my case because I'm someone who wants to easily implement an algorithm without having to work out low level details. <a title="Haskell" href="http://www.haskell.org/" target="_blank">Haskell</a> is the God of languages in this case which I'll come to shortly. And yes, I'm a lazy sloth.</p>
<p>During these three weeks, I tried my hand out in a lot of other things as well such as Perl, linux socket programming, linux driver coding, trivial kernel hacking and lastly, Haskell. Haskell is one thing that's impressed me a lot. Thanks <a title="Vivi" href="http://vivisheksudhir.wordpress.com" target="_blank">Vivi</a> for introducing me to it. Haskell is a purely functional programming language. To learn Haskell, you basically have to unlearn whatever programming you already know, and then learn it again from scratch. But learning Haskell makes you re-think and improve your programming methodology it seems. I didn't read too much on it because I couldn't download the Hugs compiler till I get back to college. No point learning if you can't try out code yourself, is there? Some ten/nine pointers I know would disagree :D . Anyways, Haskell works at a very high level compared to languages like C. Hence, you can do a quicksort in just one line! Yes, one line and thats it. Brilliant eh? Here's how it looks like...<br />
<span style="color:#ff6600;"><br />
<span style="color:#000080;"> qsort []     = []<br />
qsort (x:xs) = qsort (filter (&#60; x) xs) ++ [x] ++ qsort (filter (&#62;= x) xs)</span></span></p>
<p>The first line means, "qsort on an empty list returns an empty list". The second line is read as follows, "qsort is a function operated on a list where the first element is x and the rest is tagged xs, such that the element x lies between two elements such that the ones on the right are greater than or equal to it and the ones on the left are less than or equal to it". ++ is the concatenation symbol. And yes, Haskell thrives on recursions.</p>
<p>I can't wait to get back to college and get into the hustle and bustle of life all over again. I'm also looking forward to attending the induction training programme for the <a title="Sun Campus Ambassador Programme" href="http://developers.sun.com/students/campus_ambassadors.jsp">Sun Campus Ambassadors</a> in Bangalore between the 27th and 29th of this month. My CA work officially starts from the 1st of August. Anyways, I've laid down a set of goals for myself  for the coming semester which according to Suvha, might lead to me ending up in an asylum. Maybe, I am overloading myself again. Maybe I'm not. Whatever the case, I guess I'm all for it now. I think I'm rejuvenated and wiser (laugh you morons...laugh) after a couple of lessons life thought me in the past few months. Let's see how things change now...</p>
<p>Cheers!</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Creating a file with Python]]></title>
<link>http://rogermcd.wordpress.com/?p=63</link>
<pubDate>Sun, 20 Jul 2008 09:10:53 +0000</pubDate>
<dc:creator>drieick</dc:creator>
<guid>http://rogermcd.wordpress.com/?p=63</guid>
<description><![CDATA[Python does not offer a pre-built function that will make a file. Fortunately, it is very simple to ]]></description>
<content:encoded><![CDATA[<p>Python does not offer a <a href="http://docs.python.org/lib/bltin-file-objects.html" target="_blank">pre-built function</a> that will make a file. Fortunately, it is very simple to create a function that will handle this. Whenever Python is told to read a file, it will look for it wherever you specify it to. However, if that file does not exist, Python will return a IOError exception. That's when you tell Python to <em>read</em> a file. What happens if you tell Python to <em>write</em> to a file and the file is not there? Python will create that file automatically (not sure if you can turn this off). All you have to do is tell Python to write to a file that does not exist (hence why it is to be created) and Python will create it for you. Here is a function that I've tested twice and it worked twice:</p>
<pre>def MakeFile(file_name):

	"""
		MakeFile(file_name): makes a file.
	"""

	temp_path = 'C:\\Python25\\' + file_name
	file = open(temp_path, 'w')
	file.write('')
	file.close()
	print 'Execution completed.'

MakeFile('index.html')</pre>
<p>And, it can be any file type you want and it can have whatever you want in it. You can even create a blank file. In fact, all files start out blank. Python needs a file to manipulate in order for it to actually manipulate anything. In other words, Python creates a blank file and <em>then</em> writes to it (if there is anything to write). This is why I tested the function twice, by the way.</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Endlich: Python 2.5 für Gentoo]]></title>
<link>http://doppelhertz.wordpress.com/?p=24</link>
<pubDate>Sun, 20 Jul 2008 08:25:07 +0000</pubDate>
<dc:creator>DoppelHertz</dc:creator>
<guid>http://doppelhertz.wordpress.com/?p=24</guid>
<description><![CDATA[Gestern nach einem Sync die freudige Überraschung: Python 2.5.2 wurde für mein Gentoo freigegeben!]]></description>
<content:encoded><![CDATA[<p>Gestern nach einem Sync die freudige Überraschung: Python 2.5.2 wurde für mein Gentoo freigegeben!</p>
<p>python-updater hat dann gleich mal 65 Pakete neu kompiliert um den Umstieg komplett zu machen. Mit dabei war auch OpenOffice.org, das trotz angekündigter Kompilierzeit von vier Stunden nach eineinhalb Stunden fertig war. Ein Hoch auf CCache!</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Editor de código livre com suporte à várias linguagens de programação]]></title>
<link>http://cacalinks.wordpress.com/?p=842</link>
<pubDate>Sun, 20 Jul 2008 02:58:14 +0000</pubDate>
<dc:creator>deianaweb</dc:creator>
<guid>http://cacalinks.wordpress.com/?p=842</guid>
<description><![CDATA[
O Notepad++, desenvolvido por Don HO, é um editor de código livre (e um substituto do Notepad), q]]></description>
<content:encoded><![CDATA[<p style="text-align:left;"><img class="size-full wp-image-844 aligncenter" src="http://cacalinks.wordpress.com/files/2008/07/notepad.gif" alt="" width="196" height="80" /><br />
O <strong>Notepad++</strong>, desenvolvido por Don HO, é um editor de código livre (e um substituto do Notepad), que suporta várias linguagens de programação, rodando sobre o ambiente MS Windows.
</p>
<p align="justify">Este projeto é baseado em um componente para editor de texto, o <a href="http://www.scintilla.org/" target="_blank">Scintilla</a> (um componente muito poderoso), escrito em <strong>C++</strong> com pura <strong>api win32</strong> e <strong>STL</strong> (<!--i.e. without MFC, -->o que garante alta velocidade de execução e pequeno tamanho de programa), está sob a licença da <a href="http://www.gnu.org/copyleft/gpl.html" target="_blank">GPL</a>.</p>
<p align="justify"><strong>Veja abaixo as características do Notepad++ :</strong></p>
<p align="justify"><strong>1) </strong><strong>Destaque de Sintaxes e Sintaxe de Blocos</strong></p>
<p>Linguagens suportadas :</p>
<p>C, <a title="C++" href="http://notepad-plus.sourceforge.net/commun/screenshots/scrsh_multiView.gif" target="_blank">C++</a>, <a title="Java" href="http://notepad-plus.sourceforge.net/commun/screenshots/scrsh_lexerJava.gif" target="_blank">Java</a>, C#, <a title="XML" href="http://notepad-plus.sourceforge.net/commun/screenshots/scrsh_lexerXML.gif" target="_blank">XML</a>, HTML, PHP, CSS, makefile, <a title="ASCII" href="http://notepad-plus.sourceforge.net/commun/screenshots/scrsh_asciiArt.gif" target="_blank">ASCII art (.nfo)</a>, doxygen, ini file, batch file,  <a title="JavaScript" href="http://notepad-plus.sourceforge.net/commun/screenshots/scrsh_lexerHTML.gif" target="_blank">Javascript,</a> <a title="ASP" href="http://notepad-plus.sourceforge.net/commun/screenshots/scrsh_lexerAsp.gif" target="_blank">ASP</a>, <a title="VB/VBS" href="http://notepad-plus.sourceforge.net/commun/screenshots/scrsh_lexerVB.gif" target="_blank">VB/VBS</a>, <a title="SQL" href="http://notepad-plus.sourceforge.net/commun/screenshots/scrsh_lexerSQL.gif" target="_blank">SQL</a>, <a title="Objective-C" href="http://notepad-plus.sourceforge.net/commun/screenshots/scrsh_lexerObjC.gif" target="_blank">Objective-C</a>, RC resource file, Pascal, Perl, Python,  Lua, TeX, TCL, Assembler, Ruby, Lisp, Scheme, Properties, Diff, Smalltalk, Postscript, VHDL, Ada, Caml, AutoIt, KiXtart, Matlab, Verilog, Haskell, InnoSetup, CMake, YAML.</p>
<p><strong>2) WYSIWYG (O que você vê é o que você tem)</strong></p>
<p>Se você tiver uma impressora colorida poderá imprimir seu código fonte (ou qualquer outra coisa) em cores.</p>
<p><strong>3) Destaque de Sintaxes Definida pelo Usuário</strong></p>
<p>Isto permite ao usuário definir sua própria linguagem: não somente sintaxe de palavras chaves, mas também sintaxe de blocos (ex : If / endIf) , comentários e operadores. ( <a title="imagem 1" href="http://notepad-plus.sourceforge.net/commun/images/ulds_folder.gif" target="_blank">imagem1</a>, <a title="imagem 2" href="http://notepad-plus.sourceforge.net/commun/images/ulds_keywords.gif" target="_blank">imagem2</a>, <a title="imagem 3" href="http://notepad-plus.sourceforge.net/commun/images/ulds_comment.gif" target="_blank">imagem3</a>, <a title="imagem 4" href="http://notepad-plus.sourceforge.net/commun/images/ulds_op.gif" target="_blank">imagem4</a> ).</p>
<p><strong>4) Auto completar </strong></p>
<p>Para quase todas as linguagens suportadas, o usuário pode criar sua própria lista de api (ou baixar os arquivos na <a title="Download" href="http://notepad-plus.sourceforge.net/br/download.php" target="_blank">sessão download</a>). Uma vez que o arquivo api estiver pronto, digite Ctrl+Espaço para executar esta ação (veja a <a title="imagem" href="http://notepad-plus.sourceforge.net/commun/screenshots/scrsh_autocomplete.gif" target="_blank">imagem</a>). Para mais informações sobre o auto completar, por favor veja a sessão <a title="auto completar" href="http://notepad-plus.sourceforge.net/br/auto-completion-HOWTO.php" target="_blank">Auto completar</a>.</p>
<p><strong>5) Múltiplos Documentos<br />
</strong><br />
Você pode editar vários documentos ao mesmo tempo.</p>
<p><strong>6) Múltiplas Visualizações<br />
</strong><br />
Você tem duas visualizações ao mesmo tempo. Na qual você poderá visualizar/editar 2 documentos diferentes ou o mesmo documento (<a title="imagem" href="http://notepad-plus.sourceforge.net/commun/screenshots/scrsh_multiView.gif" target="_blank">imagem</a>). Você pode visualizar (editar) em 2 vistas um documento, em posições diferentes. A modificação de uma das vistas acontecerá na outra também. (ou seja, você modifica o MESMO documento quando você está no modo clone, veja a <a title="imagem" href="http://notepad-plus.sourceforge.net/commun/screenshots/scrsh_multiViewCloneMode.gif" target="_blank">imagem</a>).</p>
<p><strong>7) Suporta Expressões de Busca/Substituição</strong></p>
<p>Você pode buscar a substituir uma string (frase) no documento usando expressões regulares.</p>
<p><strong>8 ) Suporta o Arrastar e Soltar<br />
</strong><br />
Você pode abrir um documento arrastando e soltando. Você pode também mover seu documento (ou visualização) de uma posição a outra usando o Arrastar e Soltar.</p>
<p><strong>9 ) Posição Dinâmica de Visualizações<br />
</strong><br />
O usuário pode escolher a posição de uma visualização dinamicamente (somente em 2 modos : separação horizontal ou vertical), veja a <a title="imagem" href="http://notepad-plus.sourceforge.net/commun/screenshots/scrsh_rotate.gif" target="_blank">imagem</a>.</p>
<p><strong>10) Auto detecção de Estado do Arquivo</strong></p>
<p>Se você modificar ou apagar um arquivo que esteja aberto no Notepad++, você receberá uma notificação para atualizar seu documento (recarregar o arquivo ou apagar o arquivo).</p>
<p><strong>11) Avanço/Recuo de Zoom</strong></p>
<p>Esta é uma outra fantástica função do componente Scintilla. Simplesmente veja a <a title="imagem" href="http://notepad-plus.sourceforge.net/commun/screenshots/scrsh_zoom.gif" target="_blank">imagem</a>.</p>
<p><strong>12) Ambiente com Suporte a Múltiplos Idiomas</strong></p>
<p>O chinês, japonês, coreano, árabe e hebraico são suportados no ambiente Windows. Veja o Notepad++ sob o <a title="Chinês - Windows" href="http://notepad-plus.sourceforge.net/commun/screenshots/scrsh_underChineseSys.gif" target="_blank">Chinês - Windows</a> , sob o <a title="Árabe - Windows" href="http://notepad-plus.sourceforge.net/commun/screenshots/scrsh_underArabicWin.gif" target="_blank">Árabe - Windows</a> e sob o <a title="Hebraico - Windows" href="http://notepad-plus.sourceforge.net/commun/screenshots/scrsh_underHebrewWin.gif" target="_blank">Hebraico - Windows</a> em ação.</p>
<p><strong>13) Marcadores</strong></p>
<p>Basta clicar na margem para inserir um marcador (no lado direito da margem junto ao nº da linha) ou digitar Ctrl+F2 para inverter o marcador. Para ir até um marcador, digite F2 (Próximo Marcador) ou Shift+F2 (Marcador Anterior). Para excluir todos os marcadores, clique no Menu Localizar-&#62;Excluir Marcadores. Veja a <a title="imagem" href="http://notepad-plus.sourceforge.net/commun/screenshots/scrsh_bookmark.gif" target="_blank">imagem</a>.</p>
<p><strong>14) Chaves, Colchetes e Parênteses com Destaque</strong></p>
<p>Quando o cursor se apróxima de um desses símbolos { } [ ] ( ) , o símbolo que está próximo ao cursor e o símbolo simetricamente oposto são destacados, assim como sua guia de identação (se houver) fazendo com que a localização de um bloco seja mais fácil. Veja a <a title="imagem1" href="http://notepad-plus.sourceforge.net/commun/screenshots/scrsh_braceIndentGuideHiLiting.gif" target="_blank">imagem1</a>,  <a title="imagem2" href="http://notepad-plus.sourceforge.net/commun/screenshots/scrsh_braceHiLiting.gif" target="_blank">imagem2</a> .</p>
<p><strong>15) Grava e Reproduz Macros </strong></p>
<p>Você pode salvar várias macros e criar atalhos de tecla para o próximo uso.</p>
<p align="justify"><strong>DOWNLOAD:</strong> Para <strong>baixar</strong> o programa <strong>Notepad++ (v.5.0)</strong> e obter maiores detalhes sobre  arquivos de ajuda, arquivos de api, arquivos binários, arquivos de estilos, arquivos de imagens, códigos fonte, temas, plugins,  vá diretamente do site do desenvolvedor: <a title="Download do Notepad++" href="http://notepad-plus.sourceforge.net/br/download.php" target="_blank">clicando aqui</a></p>
<p align="justify">Já existe a versão 5.0.1 do programa Notepad++ disponível no Baixaki, porém, testamos o executável e o mesmo apresentou erro na hora da instalação, assim, não disponibilizaremos o link dessa versão.<a title="Download da versão 5.0.1 - Notepad++" href="http://baixaki.ig.com.br/download/Notepad-.htm" target="_blank"></a></p>
<p align="justify">O programa tem 2,03MB, não possui limitações, é totalmente gratuito e funciona nos sistemas: Windows XP/98/2000.</p>
<p align="justify">
<p align="justify">
<p align="justify">
<p align="justify">
]]></content:encoded>
</item>
<item>
<title><![CDATA[Flex client updating objects in Google App Engine]]></title>
<link>http://fernandoacorreia.wordpress.com/?p=39</link>
<pubDate>Sun, 20 Jul 2008 01:31:47 +0000</pubDate>
<dc:creator>fernandoacorreia</dc:creator>
<guid>http://fernandoacorreia.wordpress.com/?p=39</guid>
<description><![CDATA[I am continuing to learn how to integrate Flex to Google App Engine. Now my test project is able to ]]></description>
<content:encoded><![CDATA[<p>I am continuing to learn how to integrate Flex to Google App Engine. Now my <a href="http://fernandoacorreia.wordpress.com/2008/07/15/flex-and-python-project/">test project</a> is able to update objects, in addition to inserting and retrieving them.</p>
<p><a href="http://fernandoacorreia.files.wordpress.com/2008/07/flex-client-2008-07-19.png"><img class="alignnone size-full wp-image-41" src="http://fernandoacorreia.wordpress.com/files/2008/07/flex-client-2008-07-19.png" alt="" width="490" height="353" /></a></p>
<p>On the server side, this is done by the <em>update </em>service operation:</p>
<p>[sourcecode language='python']<br />
def update(self, project):<br />
    logging.debug('udpate %s' % (project))<br />
    existing_project = Project.get(project._key)<br />
    existing_project.name = project.name<br />
    existing_project.put()<br />
    return Project.get(project._key)<br />
[/sourcecode]</p>
<p>There is also a new <em>save </em>operation that decides between insert and update depending on the state of the object. If the object was read before, it is updated. Otherwise, it is inserted:</p>
<p>[sourcecode language='python']<br />
def save(self, project):<br />
    logging.debug('save %s' % (project))<br />
    if hasattr(project, '_key') and project._key != None:<br />
        return self.update(project)<br />
    else:<br />
        return self.insert(project)<br />
[/sourcecode]</p>
<p>The App Engine model is also saving the date and time each object was last modified:</p>
<p>[sourcecode language='python']<br />
class Project(db.Model):<br />
    # ...<br />
    modified_at = db.DateTimeProperty(auto_now=True)<br />
[/sourcecode]</p>
<p>On the client side, the <em>save </em>operation is called after an object is prepared. If the object was being edited, its key was saved and so the service will know it must be updated. If it is a new object, the key will be null so the service will insert a new object.</p>
<p>[sourcecode language='jscript']<br />
public function submitProject():void {<br />
    var newProject:Object = new Object();<br />
    newProject.code = project_code.text;<br />
    newProject.name = project_name.text;<br />
    newProject._key = project._key;<br />
    gateway.call("ProjectService.save", new Responder(null, onFault), newProject);<br />
    getProjects();<br />
}<br />
[/sourcecode]</p>
<p>The <em>_key</em> property is a very important piece of information in this context. So I patched the PyAMF library to include it within every object it sends to the client. There is a <a href="http://pyamf.org/ticket/307">ticket</a> for that on the PyAMF project.</p>
<p>[sourcecode language='python']<br />
def writeObjectAMF(self, obj, args, kwargs, remove):<br />
    """<br />
    Writes an object that has already been prepared by writeObjectAMF0 or writeObjectAMF3.<br />
    """<br />
    try:<br />
        obj._key = str(obj.key())<br />
    except:<br />
        obj._key = None<br />
    self.writeObject(obj, *args, **kwargs)<br />
    del obj._key<br />
    if remove:<br />
        self.context.class_aliases[obj.__class__] = None<br />
[/sourcecode]</p>
<p>All the source code for this project is hosted in <a href="http://github.com/fernandoacorreia/flex-and-python-test/tree/25770d9289ba2410668f00310d57ea51a0b6b97c">github</a>. Please be aware that I am sharing what I find out as I learn. I am sure there are better ways of using this tools. I hope to learn them. Comments are welcome.</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Reading all the Documentation...]]></title>
<link>http://jintoreedwine.wordpress.com/?p=28</link>
<pubDate>Sat, 19 Jul 2008 23:59:27 +0000</pubDate>
<dc:creator>jintoreedwine</dc:creator>
<guid>http://jintoreedwine.wordpress.com/?p=28</guid>
<description><![CDATA[So apparently when people the time to write something down they wrote it down for a reason. I happen]]></description>
<content:encoded><![CDATA[<p>So apparently when people the time to write something down they wrote it down for a reason. I happened to have missed this simple fact recently when I was working on some Python scripts. I was trying to separate the scripts into different folders based on what they did. Simple enough, but then I ran into the issue of certain scripts needing to go around folder boundries. Of course, Python supports this feature using it's import system.</p>
<p>This is where my trouble was. I was reading the article about how import works from the standard <a href="http://www.python.org/doc/">Python docs</a>. So I read as much as I thought I needed and skipped over, what I thought at the time, to be unimportant. As it turns out the ability to do relative imports using '..' is a feature of only Python 2.5 *sigh*. Alright, so I could have just installed Python 2.5, but I didn't want to limit this code to running on Python 2.5 for no good reason. So I went back and changed the code to using absolute imports which took around 30 minutes because there were a decent number of files to play with.</p>
<p>So how did I miss this in the documentation? Well I managed to skim over the part which mentions this is only for Python 2.5 (I blame myself for this, btw). I take this as a lesson to pay closer attention when reading documentation. It may have taken me an extra 5 or 10 minutes to read all the documentation about imports and Python... but I will would have saved half an hour of my time if I had taken the extra effort :)</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[[python] iter dict]]></title>
<link>http://sathyz.wordpress.com/2008/07/19/python-iter-dict/</link>
<pubDate>Sat, 19 Jul 2008 17:01:45 +0000</pubDate>
<dc:creator>sathyz</dc:creator>
<guid>http://sathyz.wordpress.com/2008/07/19/python-iter-dict/</guid>
<description><![CDATA[To iterate dict common mistake what everyone will do is,
mapping = {5 : "5", 6 : "6"}
for key, val i]]></description>
<content:encoded><![CDATA[<p>To iterate dict common mistake what everyone will do is,</p>
<p><code>mapping = {5 : "5", 6 : "6"}<br />
for key, val in mapping.items(): ...</code></p>
<p>Use iter* methods when possible<br />
<code><br />
mapping = {5: "5", 6: "6"}<br />
for key, val in mapping.iteritems(): ...<br />
for key in mapping: ...</code></p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Version numbers on trunk and maintenance branches]]></title>
<link>http://philikon.wordpress.com/?p=12</link>
<pubDate>Sat, 19 Jul 2008 16:57:56 +0000</pubDate>
<dc:creator>philikon</dc:creator>
<guid>http://philikon.wordpress.com/?p=12</guid>
<description><![CDATA[The release process that I wrote for the Zope subversion repository states that a library&#8217;s ve]]></description>
<content:encoded><![CDATA[<p>The <a href="http://svn.zope.org/*checkout*/Sandbox/philikon/foundation/releasing-software.txt">release process</a> that I wrote for the Zope subversion repository states that a library's version number on the trunk or a release branch should always be the <em><strong>next</strong></em> release version number applicable to that branch. For instance, if <code>zope.interface</code> 3.4.1 were just released from the 3.4.x branch, the version number of <code>zope.interface</code> on that branch should read 3.4.2dev.</p>
<p>Let me explain why I suggested this practice and, despite much critique, still maintain it's makes the most sense.</p>
<p>First of all, the<a href="http://peak.telecommunity.com/DevCenter/setuptools#managing-continuous-releases-using-subversion"> setuptools documentation states</a>:</p>
<blockquote><p>Note: the project version number you specify in <tt class="literal"><span class="pre">setup.py</span></tt> should always be the <em>next</em> version of your software, not the last released version.</p></blockquote>
<p>So it's a convention that seems to be generally suggested. That doesn't necessarily mean it's a good idea, though.</p>
<p>What makes it a good idea is the fact that when you get a checkout of the trunk or a development branch, the version number is actually meaningful, due to setuptools' version semantics</p>
<blockquote>
<pre>3.4.1 &#60; 3.4.2dev &#60; 3.4.2</pre>
</blockquote>
<p>So, a development egg of <code>zope.interface</code> 3.4.2dev will for instance satisfy a version requirement like "<code>zope.interface &#62; 3.4.1</code>". For example, say you wanted to temporarily deploy from a subversion checkout. I had to do this to get my <a href="http://www.plope.org/Members/chrism/flymake-mode">PyFlakes running with Emacs</a>. The latest release PyFlakes 0.2.1 wasn't good enough because something got fixed on the trunk. So I got a trunk checkout and did a</p>
<blockquote>
<pre>python setup.py install</pre>
</blockquote>
<p>into a virtualenv. Surely enough, the trunk's version number was still pointing to 0.2.1. So I ended up with <code>pyflakes-0.2.1-py2.4.egg</code> in my site-packages and no way to tell it from the actual 0.2.1 release. (Yes, I know there's some setuptools parameter than can let you build versions like 0.2.1-r48292, and those would be fine, if they were configured to occur on the trunk automatically.) So that's why not only bumping the version number to the next release but also adding the "<code>dev</code>" marker to tell development eggs or snapshots apart from actual release (and prevent people from releasing from the trunk!) is a good idea.</p>
<p>To conclude, I think bumping the version number to the next or at least the next anticipated release (it's ok if you don't get the version number right the first time) and adding a dev marker is not only a good idea, I think it's pretty much the only way to get the version number semantics of development eggs right (unless you use r34234 suffixes which have other problems). Of course, I'm willing to be convinced otherwise if alternate solutions achieve the same semantics. Comment away!</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[From No Clue to 3 Websites with Django in 1 week]]></title>
<link>http://mindfultechnology.wordpress.com/?p=15</link>
<pubDate>Sat, 19 Jul 2008 07:59:19 +0000</pubDate>
<dc:creator>TJ</dc:creator>
<guid>http://mindfultechnology.wordpress.com/?p=15</guid>
<description><![CDATA[I started &#8220;40 hours ago&#8221; without much knowledge of Python or Django (I had played with b]]></description>
<content:encoded><![CDATA[<p class="synopsis">I started "40 hours ago" without much knowledge of Python or Django (I had <em>played</em> with both for a couple hours a while back). Now I have three mini-sites using the Django framework live.</p>
<p>Thus, my first few experiences with <a href="http://www.djangoproject.com/">Django</a> on <a href="http://www.python.org/">Python</a> have been remarkable.<!--more--> First some</p>
<h1>Story-telling</h1>
<p>(<a href="#meat_potatos">The meat and potatoes are below ...</a>)</p>
<p><a href="http://mindfultechnology.wordpress.com/files/2008/07/screenshot_day_care.jpg"><img class="alignright size-medium wp-image-21" src="http://mindfultechnology.wordpress.com/files/2008/07/screenshot_day_care.jpg?w=300" alt="" width="240" height="168" /></a>1) My wife started a home-based <a href="http://www.day-care-tigard.com/">child care business for the Tigard (Oregon) area</a>. I put together a mini-website that lets her edit page content, add pages and manage an activity log that is accessible only to registered parents. More work is necessary, especially for content. I was focusing on high ranking in Google when doing keyword research, registering the domain name and putting content together, but I was a little surprised to see this site come up in the first position of the SERP for the query <a href="http://www.google.com/search?q=day+care+tigard">"day care tigard"</a> a few days after posting it. The challenge now is to make it first for <a href="http://www.google.com/search?q=child+care+tigard">"child care tigard"</a> ... but I have a few ideas.</p>
<p><a href="http://mindfultechnology.wordpress.com/files/2008/07/screenshot_ecofarms.jpg"><img class="alignright size-medium wp-image-22" src="http://mindfultechnology.wordpress.com/files/2008/07/screenshot_ecofarms.jpg?w=300" alt="" width="240" height="168" /></a>2) We updated the previous <em>splash</em> site for EcoFarms International, LLC, which specializes in <a href="http://www.ecofarmsintl.com/">growing organic produce year-round</a>. The business users can now post "newsletters" (similar to blog entries) either as a new page or as a PDF upload. The key functionality is the newsletter notification, which is sent to people who signed up for it. I am working on making this a little bit more robust along the lines of <a href="http://foreclosures-4-investors.com/">Foreclosures 4 Investors</a>, for which I implemented a system that sends on the order of 100,000 <strong>opt-in</strong> e-mails per month. The business users also get statistics regarding how often recipients click on links in the notifications.</p>
<p><a href="http://mindfultechnology.files.wordpress.com/2008/07/screenshot_wedding_website.jpg"><img class="size-medium wp-image-24 alignright" src="http://mindfultechnology.wordpress.com/files/2008/07/screenshot_wedding_website.jpg?w=300" alt="" width="240" height="168" /></a>3) A good friend of mine <a href="http://www.candice-and-jesse.com/">is getting married</a>, so I put together a simple site with an RSVP form. I spent most of the time on the design (of the website and an invitation), which was based on work provided by <a href="http://www.bentabb.com/">Ben Tabb, a web designer here in Portland</a>.<br />
<a name="meat_potatos"></a></p>
<h1>The mythical man week</h1>
<p>All three sites together took less than 40 <em>weekend-only-early-morning-and-night</em> hours (the weekdays where slammed with my work at <a href="http://www.aisle7.net">Aisle7</a>). That includes (almost) all design work, all markup and styling work, all programming and framework configuration, all the time spent setting up the sites at the <a href="http://www.webfaction.com/">hosting provider</a> and all client communication.</p>
<h1>Stunned and humbled</h1>
<p>That's not bad for three projects. Especially considering that when I started, <em><strong>I had very little--virtually no--experience either in programming Python or working with the Django Framework</strong></em>. The 40 hours also included me setting up an appropriate development environment after researching the options, learning "pythonic" programming, reading the relevant Django documentation and diving into the framework. I spent parts of this man week debugging mistakes like <code>('not a tuple')</code> instead of <code>('a tuple'<strong>,</strong>)</code> and learning about <a href="http://mail.python.org/pipermail/python-ideas/2007-January/000073.html">mutable function parameter defaults</a> (thanks to <a href="http://www.logilab.org/857">PyLint</a><a href="#pylint"><sup>[1]</sup></a>, and no, I don't think it's a <em>wart</em>) as well as the intricacies of the PYTHON_PATH. I fixed a bug locally in the Django framework that caused the <code>ConditionalGetMiddleware</code> not to function properly (a later update from trunk applied the exact same fix). And I found a <a href="http://www.hare.demon.co.uk/pysmtp.html">simple SMTP server</a> written in Python that I could use to test the notification function and the RSVP form locally. Having <a href="http://www.webfaction.com/">WebFaction</a> as a hosting provider enabled me, <em>within this time frame</em>, to also configure <a href="http://trac.edgewall.org/">trac</a> (including the Eclipse <a href="http://wiki.eclipse.org/Mylyn/SOC/2006/Trac_Connector">Mylyn-trac integration</a>) and SVN (including post-commit e-mail notifications for our loosely coupled team). I don't know of any other platform/tool combination that would allow (me) this level of productivity.</p>
<p>BTW, I spent an estimated 4 of those 40 hours fixing CSS styling issues around IE 6 quirks, which shows how much this browsers really sucks. (Or how poor my CSS skills are? Nah, that can't be it ...)</p>
<h1>The right tool for the right job</h1>
<p>Django is great to work with, but it helped to have a certain development environment setup: I run <a href="http://pydev.sourceforge.net/">PyDev</a> on Eclipse (including the extensions). I have the Django SVN trunk checked out and configured as a project in Eclipse. Each new project gets the Django project as a dependency, which gives me code completion and automatic import statement generation. This configuration also enables me to click on any Django class or method and jump directly to the source, which is better than any documentation.</p>
<p>I am fairly new to Python, and I am already very excited about the language. What impresses me is the brevity of the code that is achieved without relying on hacky shortcuts--all the syntax clutter was simply left out.</p>
<hr /><a name="pylint">[1] </a>The number of steps needed getting PyLint to work justify a separate post.</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Removing duplicates from a list]]></title>
<link>http://pythonism.wordpress.com/?p=53</link>
<pubDate>Fri, 18 Jul 2008 23:38:57 +0000</pubDate>
<dc:creator>pythonisms</dc:creator>
<guid>http://pythonism.wordpress.com/?p=53</guid>
<description><![CDATA[Suppose that in some Python code you have a list of items which contains duplicates. How could you r]]></description>
<content:encoded><![CDATA[<p>Suppose that in some Python code you have a list of items which contains duplicates. How could you remove the excess items ? The first way that originally occurred to me was to create a new list and if each item in the first list is not already in the second list, then add it:</p>
<p style="border:2px dashed red;padding:20px;">a=range(10000)<br />
# add some duplicates to the list<br />
for x in range(10,10000,3):<br />
&#160;&#160;&#160;&#160;a.append(x)<br />
&#160;<br />
g=[]<br />
for z in a:<br />
&#160;&#160;&#160;&#160;if z not in g:<br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;g.append(z)</p>
<p>This is fine and seems to work, but if you ever have a large list you will notice quite a lot of slowdown. There is a better way, which is very simple and speeds up the process a lot. First you need to make sure the list is sorted, and then you simply omit appending the item from the first list if it is the same as the value from the last iteration:</p>
<p style="border:2px dashed red;padding:20px;">a=range(10000)<br />
# add some duplicates to the list<br />
for x in range(10,10000,3):<br />
&#160;&#160;&#160;&#160;a.append(x)<br />
&#160;<br />
g=[]<br />
y=0<br />
for z in a:<br />
&#160;&#160;&#160;&#160;if z!=y:<br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;g.append(z)<br />
&#160;&#160;&#160;&#160;y=z</p>
<p>If your reasoning is built upon simple steps that you have learned well then you will avoid complexity panic. Each time you go back to basics you see new angles, until you know the basics so well that they are a part of you, and then you can climb higher up the mountain.</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Another good excuse for not doing laundry . . .]]></title>
<link>http://crunchiemummy.wordpress.com/?p=754</link>
<pubDate>Fri, 18 Jul 2008 20:29:05 +0000</pubDate>
<dc:creator>Karen</dc:creator>
<guid>http://crunchiemummy.wordpress.com/?p=754</guid>
<description><![CDATA[Apparently, a woman in Maine was checking on her laundry the other day when she discovered an 8 foot]]></description>
<content:encoded><![CDATA[<p>Apparently, a woman in Maine was checking on her laundry the other day when she discovered an 8 foot python wrapped around her clothes inside the washing machine!</p>
<p>The snake had somehow got in to her house through the water pipes as it was searching for somewhere damp to reside.</p>
<p>Snakes alive!</p>
<p>And, just as I was about to try and get more laundry done!  I know, any excuse, right?</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Links to Cheat Sheets ]]></title>
<link>http://8bitsofcoffee.wordpress.com/?p=47</link>
<pubDate>Fri, 18 Jul 2008 19:35:31 +0000</pubDate>
<dc:creator>8bitsofcoffee</dc:creator>
<guid>http://8bitsofcoffee.wordpress.com/?p=47</guid>
<description><![CDATA[Here&#8217;s a list of very helpful cheatsheets, convering different paradigms of proramming languag]]></description>
<content:encoded><![CDATA[<p>Here's a list of very helpful cheatsheets, convering different paradigms of proramming languages</p>
<ul>
<li><a href="http://www.rubyinside.com/ruby-cheat-sheet-734.html">Ruby Cheat Sheet</a> is a link to a couple of cheat sheets and also to quick references to the language. Came in very handy</li>
<li><a href="http://search.cpan.org/~nwclark/perl-5.8.7/pod/perlcheat.pod">Perl 5 Cheat Sheet</a> from CPAN<br />
<blockquote><p>This 'cheat sheet' is a handy reference, meant for beginning Perl programmers. Not everything is mentioned, but 194 features may already be overwhelming.</p></blockquote>
</li>
<li><a href="http://www-128.ibm.com/developerworks/library/l-cheatsheet3.html">Python 101 Cheat Sheet</a>, covers more than one sheet :P but is EXTREMELY <!--[if gte mso 9]&#62;  Normal 0   false false false        MicrosoftInternetExplorer4  &#60;![endif]--><!--[if gte mso 9]&#62;   &#60;![endif]--> helpful for beginners like myself. And <a href="http://www.limsi.fr/Individu/pointal/python/pqrc/">here</a>'s a quick reference to Python as well.</li>
<li><a href="http://www.dreamincode.net/forums/showtopic17946.htm">Java Quick Reference (Cheat Sheet)</a></li>
<li><a href="http://www.blueshoes.org/en/developer/php_cheat_sheet/">PHP Syntax Cheat Sheet</a>, in the same link there's also a fun syntax exam you can test yourself with.</li>
<li><a href="http://faculty.olin.edu/~jcrisman/Teaching/SigSysWeb/Embedded/c_cheat_sheet.htm">C Cheat Sheet</a></li>
<li><a href="http://www.codeslate.com/2007/12/c-cheat-sheet.html">C++ Refresher Cheat Sheet</a></li>
<li><a href="http://www.addedbytes.com/cheat-sheets/ruby-on-rails-cheat-sheet/">Here</a>'s a great collection of Ruby on Rails cheat sheet.</li>
<li>You can consider this <a href="http://htmlplayground.com/">site</a> and interactive HTML+CSS cheat sheet. A must bookmark.</li>
<li><a href="http://www.perlmonks.org/?node_id=238031">Perl 6 Cheat Sheet</a></li>
</ul>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Python &amp; Co]]></title>
<link>http://paidenough.wordpress.com/?p=15</link>
<pubDate>Fri, 18 Jul 2008 16:39:10 +0000</pubDate>
<dc:creator>paidenough</dc:creator>
<guid>http://paidenough.wordpress.com/?p=15</guid>
<description><![CDATA[Some of you are curious about the technologies we are using.
We are a Python loving lot. We use the ]]></description>
<content:encoded><![CDATA[<p>Some of you are curious about the technologies we are using.</p>
<p>We are a <a href="http://www.python.org/">Python</a> loving lot. We use the <a href="http://pylonshq.com/">Pylons</a> framework and <a href="http://getschevo.org/">Schevo ODBMS</a>. I can recommend both. We are on a <a href="http://www.ubuntu.com/products/WhatIsUbuntu/serveredition">Ubuntu Hardy Server</a> @ <a href="http://www.linode.com">Linode</a> and <a href="http://www.slicehost.com">Slicehost</a>. We serve using <a href="http://www.apache.org/">Apache</a> and <a href="http://pythonpaste.org/">Paste HTTP Server</a>. We use google apps for all emailing needs.</p>
<p>If you have specific questions, drop a comment or email.</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[A quick five.grok sprint update!]]></title>
<link>http://regebro.wordpress.com/?p=112</link>
<pubDate>Fri, 18 Jul 2008 15:13:59 +0000</pubDate>
<dc:creator>Lennart Regebro</dc:creator>
<guid>http://regebro.wordpress.com/?p=112</guid>
<description><![CDATA[Today and yesterday we have been six people at the Bubblenet offices in Louvain-la-Neuve, Brussels, ]]></description>
<content:encoded><![CDATA[<p>Today and yesterday we have been six people at the Bubblenet offices in <span><span><span dir="ltr"><span class="locality">Louvain-la-Neuve, Brussels, where we have been working on five.grok. The main work has been implementing views. During this my intuition proved incorrect and Godefroids correct: Most of the classes and grokkers from Grok turned out to be directly useable under five.grok with no modifications.I thought we would need much more differences between Grok and five.grok than has so far been the case. (Although security will certainly be a big issue).<br />
</span></span></span></span></p>
<p><span><span><span dir="ltr"><span class="locality">As a result of this a new module has been started to keep everything related to views and layers and such, and it will probably be called grokcore.browser (although it's currently called grokcore.view). Just as grokcore.component extracts the parts from grok that has to do with the component architechture, grokcore.[browser&#124;view] has all the parts with Zope views. We hope to get this accepted into Grok itself, so that both Grok and five.grok ends up using it, because there is a lot of code, and a massive amount of tests to handle views, and it would be silly to have two implementations of everything.</span></span></span></span></p>
<p>As a result of this, five.grok now has both adapters and utilities and views, and is therefore right now starting to become useful. Some have today been sprinting on an example application of how to extend a Zope2 object with five.grok views. We hope this example application will show us what is missing and what the next parts to be added to five.grok is.</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Going to OSCON]]></title>
<link>http://tarekziade.wordpress.com/?p=110</link>
<pubDate>Fri, 18 Jul 2008 12:00:08 +0000</pubDate>
<dc:creator>Tarek Ziadé</dc:creator>
<guid>http://tarekziade.wordpress.com/?p=110</guid>
<description><![CDATA[I am leaving tomorrow, heading to Portland, OR, to OSCON. My talk on zc.buildout and Plone will be t]]></description>
<content:encoded><![CDATA[<p>I am leaving tomorrow, heading to Portland, OR, to <a href="http://en.oreilly.com/oscon2008/public/content/home" target="_blank">OSCON</a>. My talk on <a href="http://en.oreilly.com/oscon2008/public/schedule/detail/2712" target="_blank">zc.buildout and Plone</a> will be thurdsay the 24th, and I'll be there the whole week.</p>
<p>If you are going there and want to meet leave me a note, I am looking forward to meet other geeks there. :D</p>
]]></content:encoded>
</item>

</channel>
</rss>
