I recently started working my way through Nathan Yau’s book Visualise This.
In it, he introduces readers to Python. I dutifully downloaded Python and started playing about. I don’t know much code (I’ve mucked about a little in VBA and R), but I found Python easy to pick up. This is probably partly due to Yau’s good introduction, and partly about the ease of learning Python.
As time is short, I don’t fancy learning lots of languages (this is a key reason I chose to learn R; it’s free and kept well up to date, so I am pretty sure I won’t have to learn another stats package); given this, it wasn’t long before I started to worry that maybe I could better invest my time in learning Perl.
I’ve spent a few hours looking into the Python v Perl question and I am now satisfied that Python is the correct choice for me (I also discovered that this is a hotly debated question). I found the following article helpful; I also enjoyed this presentation by Bruce Eckel; Bruce’s slides can be found here.
So, I’m learning Python. I chose to go with 2.7.2 (rather than 3.2.1), as there are more canned packages that work with it just now.
Installing Python was easy, however to run code from the command line I had to edit my system’s path variable. I have Windows 7, so to do this on my machine I had to open the desk-top in explorer; I right-clicked “my computer” and selected “Properties”; selected “advanced system settings”; selected “Advanced”; selected “Environment Variables”; in the “System variables” box I selected “Path”; next I hit “Edit”. Almost there…
I installed Python to C:\Python27\, so in the “Variable value” box I added “;C:\Python27” to the end of the path string. Now when I type “python” at the command line, I call python; better still, commands such as
execute my python code (in this case, the command executed myscript.py, which is stored at C:\py\code\, with python)
As for Yau’s book, I’m half way done, and I rate it 7/10 thus far. I’ll write a review when I am done.