<?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>Tue, 27 Dec 2011 15:25:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Learn Python 3 Now &#8211; Resources for Diving In</title>
		<link>http://www.revolves.net/learn-python-3-now-resources-for-diving-in/</link>
		<comments>http://www.revolves.net/learn-python-3-now-resources-for-diving-in/#comments</comments>
		<pubDate>Tue, 24 May 2011 10:56:17 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://www.revolves.net/?p=466</guid>
		<description><![CDATA[You&#8217;re all charged up, ready to start with Python 3. Now, all you need is a systematic resource to follow. And that is precisely what I&#8217;ll give you. If you haven&#8217;t already installed python, you can download the latest 3.x release from Python.org. If you&#8217;re on a Linux system, then use your repository manager to [...]]]></description>
			<content:encoded><![CDATA[<p>You&#8217;re all charged up, ready to start with Python 3. Now, all you need is a systematic resource to follow. And that is precisely what I&#8217;ll give you.</p>
<p>If you haven&#8217;t already installed python, you can download the latest 3.x release from <a href="http://python.org/">Python.org</a>. If you&#8217;re on a Linux system, then use your repository manager to download the lastest Python version. Since most Linux distributions already have Python installed, your version 3 binary might be named <code>python3</code> instead of <code>python</code>, to prevent it from conflicting with the already installed version.</p>
<p>Your system might use Python to manage several stuff under the hood. So, it&#8217;s always better to leave the already installed version alone.<span id="more-466"></span></p>
<h2>All right, I&#8217;m ready to dive into it!</h2>
<p>One of the <strong>best</strong> online resource for effectively learning Python&#8217;s syntax is <a href="http://diveintopython3.org/">Dive into Python 3</a>. It&#8217;s written by Mark Pilgrim, who has been kind enough to make the book available for free online. You can also purchase a physical copy of it if you want.</p>
<p>I recommended downloading the HTML version for offline viewing: <a href="http://diveintopython3.org/d/diveintopython3-html-latest.zip">Download HTML version</a>.</p>
<p>The design of the site is also awesome. Simple but elegant.</p>
<p>Now, why did I recommend this specific resource? Well, I believe you might already be familiar with programming concepts. The only thing left to do is learn the language&#8217;s syntax and the various design patterns surrounding those syntax.</p>
<p>Mark does a great job of introducing all of the important syntactical feature of Python 3 while giving practical examples on how they&#8217;re used. The detail he covers should be sufficient for most, but he does provide you with further reading if you&#8217;d like to know even more about a particular feature.</p>
<p>The reason the book is named <em>Dive into Python 3</em> is because the first thing he does is throw a working code at you. You&#8217;re sitting there, starting at the screen, looking at a piece of alien code. Then, he breaks down the code into pieces and explains what each of them do.</p>
<p>He also has a great knack for introducing new concepts in an intuitive manner.</p>
<p>What separates this book from a simple &#8220;documentation&#8221; is that he also covers important things like refactoring, file handling and XML. Anytime you&#8217;re learning a new concept, you&#8217;re slapped with a useful piece of code that uses that feature.</p>
<p>It&#8217;s not just important to learn the &#8220;cool&#8221; language features, but it is also important to see them in context.</p>
<h2>Thanks for that, anything else I&#8217;d need?</h2>
<p>Yes, there is. Even though <em>Dive into Python</em> is an excellent resource, many people need some additional resources to start rolling. Of course, Mark&#8217;s book is amazing and will put you in command of many of Python&#8217;s core concepts. But again, there are two types of people who might be learning Python.</p>
<p>First one is a programmer already working professionally. He learns Python, and now he knows how it works. He&#8217;s now off to create more wonderful projects, hopefully in Python.</p>
<p>The second one, which represents the majority, are hobbyists. In that case, I&#8217;d also recommend resources that <strong>test your programming skills.</strong></p>
<p>You see, most of the hobbyists are always in the <em>&#8220;What should I make next&#8221;</em> mood. Since they&#8217;re not professionals, they&#8217;re never asked to make something. It&#8217;s always up to them to decide what to make. And having too many choices is very difficult.</p>
<p>For that, I&#8217;d recommend getting a book like <a href="http://www.amazon.com/gp/product/1435455002/ref=as_li_ss_tl?ie=UTF8&#038;tag=revolves-20&#038;linkCode=as2&#038;camp=217145&#038;creative=399349&#038;creativeASIN=1435455002" target="_blank">Python Programming for the Absolute Beginner, 3rd Edition</a>.</p>
<p>I don&#8217;t own it, but it has got a lot of great reviews on Amazon. It&#8217;s a 400-odd page mammoth. The good thing about the book is that since it&#8217;s targeted at beginners, it&#8217;s very detailed. And in each chapter, as you learn new Python concepts, you get to make a game using those concepts.</p>
<p>And it&#8217;s always <strong>very, very exciting</strong> to use your programming knowledge to create something that simply &#8220;works.&#8221; It might be a simple game, but at least it&#8217;s complete!</p>
<p>I remember the fun I had solving the exercises of <a href="http://www.amazon.com/gp/product/0596520107/ref=as_li_ss_tl?ie=UTF8&#038;tag=revolves-20&#038;linkCode=as2&#038;camp=217145&#038;creative=399349&#038;creativeASIN=0596520107" target="_blank">Learning Perl</a> while I was learning Perl. No matter how much programming you know, it feels really good to solve those exercises. I used to look at the exercises and ask myself, <em>&#8220;Can I do it in Perl? Well, only one way to find out, do it!&#8221;</em></p>
<h2>Program, and keep programming</h2>
<p>If you don&#8217;t program for a long time, you will tend to forget some of the syntactical aspects of a language. It&#8217;ll slow you down a bit.</p>
<p>So, the best way to gain fluency is to keep on writing small stuff. Eventually, it&#8217;ll be a breeze to write even those large programs.</p>
<p>That&#8217;s why, keep on finding things to program. It could be those exercises from a book, or a side project of yours, or the next piece of software that will change the world!</p>
<p>Good luck on your journey towards learning Python!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.revolves.net/learn-python-3-now-resources-for-diving-in/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google Teaches Python &#8211; Written Materials, Videos, Exercises</title>
		<link>http://www.revolves.net/google-teaches-python-written-materials-videos-exercises/</link>
		<comments>http://www.revolves.net/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/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/perl-vs-python-the-final-battle/</link>
		<comments>http://www.revolves.net/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/perl-vs-python-the-final-battle/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>Installing Python 3.0 In Windows Vista &#8211; A Small Problem</title>
		<link>http://www.revolves.net/installing-python-30-in-windows-vista-a-small-problem/</link>
		<comments>http://www.revolves.net/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/installing-python-30-in-windows-vista-a-small-problem/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: basic
Database Caching 29/41 queries in 0.016 seconds using disk: basic

Served from: www.revolves.net @ 2012-02-04 13:38:40 -->
