<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: PHP Looking at Python</title>
	<atom:link href="http://metrol.wordpress.com/2008/03/18/php-looking-at-python/feed/" rel="self" type="application/rss+xml" />
	<link>http://metrol.wordpress.com/2008/03/18/php-looking-at-python/</link>
	<description>A little corner of the web for Metrol rants</description>
	<lastBuildDate>Mon, 29 Dec 2008 06:36:06 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: bobobobo</title>
		<link>http://metrol.wordpress.com/2008/03/18/php-looking-at-python/#comment-30</link>
		<dc:creator>bobobobo</dc:creator>
		<pubDate>Mon, 29 Dec 2008 06:36:06 +0000</pubDate>
		<guid isPermaLink="false">http://metrol.wordpress.com/?p=16#comment-30</guid>
		<description>besides the syntatic diffs b/w php/python, i&#039;m really concerned about the lack of built-in functionality for session handling and the fact that you have to download and install a separate extension to be able to connect to a MySQL database.  Apparently the MySQLDB extension isn&#039;t yet available yet for Python 2.6 or Python 3.0.

So this is that scenario where if you&#039;re on the web, you&#039;re stuck in python 2.4/2.5.  I don&#039;t like that.

Session handling.  Appears very manual.  I saw a couple of &quot;recipes&quot; for session handling with code like:

            headers = {}
            headers[&#039;Content-type&#039;] = &#039;text/html&#039;
            headers[&#039;Set-Cookie&#039;] = &#039;sid=%s;&#039; % sid
            print_headers(headers)


That&#039;s ok, but shouldn&#039;t it be &quot;higher level&quot;?  session_start() anyone?  I mean come on.  It isn&#039;t that big a deal, but if Python wants to be taken seriously as a web development language, they really should automate a lot of this stuff and integrate it as a core part of the language.

I can&#039;t wait until I try file uploads...

   # Read the file in chunks
   for chunk in fbuffer(fileitem.file):
      f.write(chunk)
   f.close()
   message = &#039;The file &quot;&#039; + fn + &#039;&quot; was uploaded successfully&#039;


Looking at this now, I kind of LIKE the low levelness of this code.. it opens the door for perhaps programming a progress bar and stuff.. it seems like python gives you far more control over this code..

I don&#039;t know yet.  :).</description>
		<content:encoded><![CDATA[<p>besides the syntatic diffs b/w php/python, i&#8217;m really concerned about the lack of built-in functionality for session handling and the fact that you have to download and install a separate extension to be able to connect to a MySQL database.  Apparently the MySQLDB extension isn&#8217;t yet available yet for Python 2.6 or Python 3.0.</p>
<p>So this is that scenario where if you&#8217;re on the web, you&#8217;re stuck in python 2.4/2.5.  I don&#8217;t like that.</p>
<p>Session handling.  Appears very manual.  I saw a couple of &#8220;recipes&#8221; for session handling with code like:</p>
<p>            headers = {}<br />
            headers['Content-type'] = &#8216;text/html&#8217;<br />
            headers['Set-Cookie'] = &#8217;sid=%s;&#8217; % sid<br />
            print_headers(headers)</p>
<p>That&#8217;s ok, but shouldn&#8217;t it be &#8220;higher level&#8221;?  session_start() anyone?  I mean come on.  It isn&#8217;t that big a deal, but if Python wants to be taken seriously as a web development language, they really should automate a lot of this stuff and integrate it as a core part of the language.</p>
<p>I can&#8217;t wait until I try file uploads&#8230;</p>
<p>   # Read the file in chunks<br />
   for chunk in fbuffer(fileitem.file):<br />
      f.write(chunk)<br />
   f.close()<br />
   message = &#8216;The file &#8220;&#8216; + fn + &#8216;&#8221; was uploaded successfully&#8217;</p>
<p>Looking at this now, I kind of LIKE the low levelness of this code.. it opens the door for perhaps programming a progress bar and stuff.. it seems like python gives you far more control over this code..</p>
<p>I don&#8217;t know yet.  <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
]]></content:encoded>
	</item>
</channel>
</rss>
