I'm pretty familiar at this point with PHP (Javascript, too), up to the point of OOP in PHP, and am looking to branch out my knowledge. I'm looking at Python next, but a lot of it is a bit alien to me as a PHP developer.

I'm less concerned about learning the language itself. I'm positive there's plenty of good resources, documentation and libraries to help me get the code down. I'm less sure about the technical aspects of how to set up a dev environment, unit testing and other more mundane details that are very important, aid in rapid development, but aren't as widely covered.

Are there any good resources out there for this?

share|improve this question
For the choice of an IDE, see stackoverflow.com/questions/81584/what-ide-to-use-for-python – Charles Brunet Jun 28 '11 at 16:48

migrated from stackoverflow.com Jun 29 '11 at 15:29

4 Answers

up vote 4 down vote accepted

I also moved from PHP to Python. It's an easy step don't worry! :)

I only works on *nix stations, so I can't really say for other platforms, but python has a "batteries included" policy, so it comes already with a debugger and unit testing libraries. Most useful, it has an interactive console that I find pretty useful to quickly check the usage of a given function or method.

Of course each dev has their own preferences, but to get started developing on my home machine (running ubuntu) I just downloaded the Aptana Studio (it's free software based off eclipse) that integrates perfectly with the debugging and unit-testing libraries. As any eclipse-based IDE, it's heavy and not particularly snappy, but I personally find that the ease of use "wins" over saving the few seconds one can spare using VIM instead (which I also do for fun on another machine, anyhow).

Maybe the most important factor in switching from PHP to Python for me was that while PHP (at least to me, I don't want to start a religion war!) sounds like a "as far as it works it's OK" philosophy based programming language, python puts a lot of importance on the concept of writing pythonic code (you can type import this in a python console to get an idea of what I mean, or read the PEP 20 online.

A good and simple introduction to python unit-testing can be found in chapter 13 of dive into python chapter. I am suggesting this source because the chapter explains the unit testing framework by following the test-first paradigma, which is common practice between seasoned python programmers.

HTH and welcome in the world of Python! :)

share|improve this answer
1  
Thanks for all the help. This is exactly what I was looking for, answer-wise. – dclowd9901 Jun 28 '11 at 17:17

Dive Into Python is a great resource. It covers installation as well as unit testing (and everything else in between). It's a must-read when starting with Python.

As for your dev environment, I personally just use Vim and the shell. You should also check out IPython, an enhanced python shell that enables tab completion, among other things.

share|improve this answer
dive into python is a bit outdated. – Dirk Jun 28 '11 at 16:44
I suppose diveintopython3.org is more up-to-date. – mattjbray Jun 28 '11 at 16:59

You might find the book Foundations of Agile Python Development useful.

share|improve this answer

When I recently transitioned from being a full-time PHP developer to using Python on a regular basis, my first exposure to the language was through the Django framework. Django provides a lot of basic functionality, letting you bypass the mundane aspects of the language and quickly begin writing real, effective code. During the process, your Python skills will increase and your need for Django may decrease.

You can find a great tutorial here and installation instructions here:

share|improve this answer
1  
... but you better do learn good Python along the way. Not knowing basic idioms after a while is a punishable offense, in every language. – delnan Jun 28 '11 at 16:46
@delnan: Agreed. This is a starting point, not an ending point. – George Cummins Jun 28 '11 at 16:48

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.