Scenario 1: You've coded in another language, but you're not an expert.
I would start with the basic Python class at Google Code. It's targeted specifically at people who know basic programming skills in some other language. It was perfect for me; I went through the exercises and was able to quickly start writing simple, useful Python scripts.
Scenario 2: You don't know how to write code at all.
Start with the Udacity CS101 class if you like guided learning, or Learn Python the Hard Way if you prefer books. Be prepared to spend a lot of time on either. It's not easy the first time around.
After you've gotten through one of those two scenarios, do the following:
- Spend time browsing the documentation for the Python Standard Library. Python is a large language, and chances are there's something in the standard library that will help you meet your goals. If you find yourself writing a lot of lines of code to accomplish something fairly simple, look harder. I recommend skimming the documentation for every module, then looking more carefully at the ones that interest you.
- Matt Harrison's books on basic and intermediate Python are excellent. I recommend buying them and reading them.
- Jeff Knupp's Writing Idiomatic Python is really good as you gain skills. It's a bit rough around the edges, but it will help you avoid common beginner mistakes and is well worth the read.
- Practice a lot. I enjoy the math puzzles on Project Euler. These are not Python specific, but their structure makes them well suited to quick problem solving in any language. Beware -- it's very addictive!
2 comments:
Hi Jay
Awesome post! I am network engineer and like to do python scripting for automation of repetitive network tasks or reading log files from router/switches and filter information.
I have basic programming knowledge. Should I go through all books you mentioned above to write scripts or just python libraries would be enough?
Appreciated your reply !
Regards,
Kashif
Great article!!
Post a Comment