<?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>Revolves &#187; Python</title>
	<atom:link href="http://www.revolves.net/category/programming/python/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.revolves.net</link>
	<description>Innovation</description>
	<lastBuildDate>Wed, 05 May 2010 14:30:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Google Teaches Python &#8211; Written Materials, Videos, Exercises</title>
		<link>http://www.revolves.net/2010/03/19/google-teaches-python-written-materials-videos-exercises/</link>
		<comments>http://www.revolves.net/2010/03/19/google-teaches-python-written-materials-videos-exercises/#comments</comments>
		<pubDate>Sat, 20 Mar 2010 02:20:41 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://www.revolves.net/?p=359</guid>
		<description><![CDATA[If you want to learn Python, Google&#8217;s Python Class might be worth checking out. It includes videos, written material and programming exercises. It is usually given to Google employees new to python. The tutorial assumes you have at least a basic knowledge of programming concepts. If you know what a &#8220;variable&#8221; is, or what &#8220;loops&#8221; [...]]]></description>
			<content:encoded><![CDATA[<p>If you want to learn Python, <a href="http://code.google.com/edu/languages/google-python-class/" target="_blank">Google&#8217;s Python Class</a> might be worth checking out. It includes videos, written material and programming exercises. It is usually given to Google employees new to python.</p>
<p>The tutorial assumes you have at least a basic knowledge of programming concepts. If you know what a &#8220;variable&#8221; is, or what &#8220;loops&#8221; are, you should be good to go.<br />
<span id="more-359"></span><br />
It teaches various stuff like the data strucutures present in Python, regular expressions, urllib (for HTTP stuff), file handling etc. I like the way they&#8217;ve given exercises. There are many tutorials online, and most of them don&#8217;t have an exercise kind of thing which will test what you&#8217;ve learned.</p>
<p>Now, those with some Python experience might be curious about the version. Google Class recommends Python 2.6.x, and also recommends avoiding 3.x for now. The reason might be partly due to the fact that many modules are yet to be supported in 3.x. A beginner would rather learn the version which gives him the maximum flexibility.</p>
<p>Go ahead, check out the tutorial.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.revolves.net/2010/03/19/google-teaches-python-written-materials-videos-exercises/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Perl vs Python &#8211; The Final Battle</title>
		<link>http://www.revolves.net/2009/11/29/perl-vs-python-the-final-battle/</link>
		<comments>http://www.revolves.net/2009/11/29/perl-vs-python-the-final-battle/#comments</comments>
		<pubDate>Sun, 29 Nov 2009 12:54:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Perl]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://www.revolves.net/?p=264</guid>
		<description><![CDATA[You might have already seen a lot of Perl vs Python stuff. So I&#8217;m telling you in advance that I&#8217;ve too have read them all, and what you&#8217;re going to read here would be completely different than what you already have. Firstly, let me start by saying that Perl and Python are great languages. But [...]]]></description>
			<content:encoded><![CDATA[<p>You might have already seen a lot of Perl vs Python stuff. So I&#8217;m telling you in advance that I&#8217;ve too have read them all, and what you&#8217;re going to read here would be completely different than what you already have.</p>
<p>Firstly, let me start by saying that Perl and Python are great languages. But they have their own differences, which is precisely why we have two different languages. If they were the same, why have two different languages at all?</p>
<p>The people who are biased against a language are the one who try to write Python in Perl or Perl in Python. They want Perl to work like Python or vice versa. And if you&#8217;re intelligent enough, you&#8217;ll quickly understand that there is no point in having them both work in the exact same way.<span id="more-264"></span></p>
<p>I&#8217;ll shout out one basic difference between the two. This is one difference a beginner will likely notice. I won&#8217;t mention many of the &#8220;advanced differences&#8221;, for an experienced programmer doesn&#8217;t need my help for that.</p>
<p>Perl has only one primary data type, called a &#8220;scalar.&#8221; In Python, we have different types, i.e. int, string etc. You need not specify the type of the data a variable will hold, since both of these languages will find out about that themselves.</p>
<p>Once you store a number in a Python variable, the variable obtains a type int. You can&#8217;t concatenate a string and an integer like this: <em>&#8220;hello&#8221; + s</em>, where you might have previously written: <em>&#8216;s = 3&#8242;</em>. You have to explicitly convert that number into a string using <em>&#8216;str(s)&#8217;</em>.</p>
<p>Now, Perl doesn&#8217;t know the difference between a string and a number. Because all we have is scalar. So, how does Perl work then? Perl determines the type of your variable depending on the context. If you have <em>&#8216; $s = &#8220;3&#8243; &#8216;</em>, and then you write <em>&#8216; print $s * 4 &#8216;</em>, Perl will print 12. Thus, when used in a numeric context, there is no difference between <em>&#8216; $s = 3 &#8216;</em> and <em>&#8216; $s = &#8220;3&#8243; &#8216;</em>.</p>
<p>This basic fact also influenced various further design decisions. In Python, <em>&#8220;hello&#8221; * 4</em> would give &#8220;hellohellohellohello&#8221; while <em>4 * 4</em> would give 16. But if you type <em>&#8220;hello&#8221; * 4</em> in Perl, it&#8217;ll give you 0. This is because, since you&#8217;ve used &#8216;*&#8217;, Perl thinks it&#8217;s a numeric context. It solely determines datatype on basis of context. So, it fruitlessly tries converting &#8220;hello&#8221; into an integer, which yields 0 at worst. But had our string been &#8220;4hello5&#8243;, Perl would have converted it into 4.</p>
<p>That&#8217;s why Perl has a separate operator for multiplying strings. Here, typing <em>&#8220;hello&#8221; x 4</em> would print &#8220;hellohellohellohello&#8221;. The use of &#8216;x&#8217; yells string context.</p>
<p>It might seem impossible to program using such &#8220;contextual&#8221; data. But that&#8217;s how we use our natural language. In English, every word can have different meaning on the basis of context. But it still doesn&#8217;t confuse you when properly used.</p>
<p>Another little example where beginners can get trapped. In Python, there are &#8216;int&#8217; and &#8216;float&#8217; data types. The former stores integers while the latter stores numbers having decimal point. So, looking at the type, you can pretty much know whether a variable would have a decimal point or not.</p>
<p>But Perl performs all calculations in floating-points. I.e., for it all numbers are floating points. Thus, it has a function called &#8216;int&#8217;. If you have <em>&#8216;$s = 3.5&#8242;</em> and you do <em>&#8216;$s = int($s)&#8217;</em>, you&#8217;ll get 3 in $s. So, has Perl converted your decimal number into an integer? No! Remember, we only have a scalar datatype. Perl has merely truncated anything after the decimal point. That&#8217;s why there is no function to convert integers to floating points.</p>
<p>This sounds a little counter-intuitive just because we try to use our knowledge of other languages while learning a new language. We want the new language to work like the languages we&#8217;ve already learnt. Keep an open mind.</p>
<p>So, what&#8217;s the conclusion? I&#8217;m personally learning them both. Why? It&#8217;s easier to learn them both rather than fighting which one&#8217;s better. Python is elegant and powerful, and Perl has come crazy shortcuts which can help get tasks done quickly (of course, at a cost). They both have their own pluses and minuses. You should find their strengths and weaknesses for yourself, rather than being influenced by someone else.</p>
<p>And to people who say Perl is unreadable. If you know Perl, it is easy to read, else it&#8217;s going to be tough (obviously). If you can learn regex, you can learn Perl.</p>
<p>For Perl, the Llama or &#8216;Learning Perl&#8217; book by O&#8217;Reilly is great. For Python, you can find great tutorials pretty much everywhere. I&#8217;d recommend practicing the same programs both in Python and Perl initially, to develop a knack for how these languages work.</p>
<p><strong>Update: Added Amazon links to good Perl books</strong></p>
<p><iframe src="http://rcm.amazon.com/e/cm?t=revolves-20&#038;o=1&#038;p=8&#038;l=as1&#038;asins=0596520107&#038;fc1=000000&#038;IS2=1&#038;lt1=_blank&#038;m=amazon&#038;lc1=0000FF&#038;bc1=000000&#038;bg1=FFFFFF&#038;f=ifr" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe> <iframe src="http://rcm.amazon.com/e/cm?t=revolves-20&#038;o=1&#038;p=8&#038;l=as1&#038;asins=0596102062&#038;fc1=000000&#038;IS2=1&#038;lt1=_blank&#038;m=amazon&#038;lc1=0000FF&#038;bc1=000000&#038;bg1=FFFFFF&#038;f=ifr" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe> <iframe src="http://rcm.amazon.com/e/cm?t=revolves-20&#038;o=1&#038;p=8&#038;l=as1&#038;asins=0596000278&#038;fc1=000000&#038;IS2=1&#038;lt1=_blank&#038;m=amazon&#038;lc1=0000FF&#038;bc1=000000&#038;bg1=FFFFFF&#038;f=ifr" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://www.revolves.net/2009/11/29/perl-vs-python-the-final-battle/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Installing Python 3.0 In Windows Vista &#8211; A Small Problem</title>
		<link>http://www.revolves.net/2008/12/09/installing-python-30-in-windows-vista-a-small-problem/</link>
		<comments>http://www.revolves.net/2008/12/09/installing-python-30-in-windows-vista-a-small-problem/#comments</comments>
		<pubDate>Tue, 09 Dec 2008 15:45:59 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://www.revolves.net/?p=22</guid>
		<description><![CDATA[Don&#8217;t be alarmed! Its not a problem with Python or anything. But its just a weird behavior people trying to install Python 3 (I didn&#8217;t notice such a problem in previous versions) in Windows Vista might experience. I happily installed it through the given MSI Installer, but then, there was no &#8216;C:/Python30&#8242; directory, no Start-Menu [...]]]></description>
			<content:encoded><![CDATA[<p>Don&#8217;t be alarmed! Its not a problem with Python or anything. But its just a weird behavior people trying to install Python 3 (I didn&#8217;t notice such a problem in previous versions) in Windows Vista might experience. I happily installed it through the given MSI Installer, but then, there was no &#8216;C:/Python30&#8242; directory, no Start-Menu shortcuts. I was a little surprised. But I had faced this problem before, since I have Windows UAC turned on (for a good reason).<br />
<span id="more-22"></span><br />
You&#8217;ll need to give Python&#8217;s installer Administrative rights. Now, right clicking the MSI file only shows some installer related menu, but not the &#8216;Run As Administrator&#8217; menu. Follow these steps for a happy ending,</p>
<p>1. Go to your start menu, type in &#8220;cmd&#8221;. The start menu search result will show &#8220;cmd.exe&#8221;<br />
2. Right click on &#8220;cmd.exe&#8221;, and select &#8216;Run As Administrator&#8217;<br />
3. Move to the location of your MSI file. Eg., &#8216;cd C:/downloads&#8217;<br />
4. Type in the name of the MSI file, Eg., &#8216;python3.0.msi&#8217;<br />
5. This will run the installer as usual, but this time, everything will be installed correctly due to administrative access.</p>
<p>If admin access is not given, Vista puts the file in somewhere, I don&#8217;t remember exactly.</p>
<p>By the way, I&#8217;m glancing through the changes in Python 3.0. I&#8217;ll play around with it a bit and let ya guys know. I always liked Python, but I need to seriously learn it now, since 3k is out.</p>
<p>Have something to say? Please write a comment below!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.revolves.net/2008/12/09/installing-python-30-in-windows-vista-a-small-problem/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.280 seconds -->
