I recently received my copy of Real Python by Fletcher Heisler and just finished reading it. I got it as a bonus from a recent KickStarter campaign for the sequel to the book, Real Python for Web Development which is actually written by someone else. You can go to the book’s website to purchase the book and get access to the files that the book talks about. I’ll be reviewing revision 2.2, as that was what I got when I downloaded it a couple weeks ago. It appears that there’s been an update since then though. This is the first Python book I’ve ever read that focuses on Python 2.7.3, although it does mention some differences in Python 3 as it goes along.
- Why I picked it up: I got this book as part of the perks received from its sequel’s Kickstarter campaign.
- Why I finished it: The book had an engaging writing style
- I’d give it to: Programmers new to the Python language
If that intro interested you at all, feel free to join me after the jump to read the full review!
This book is available as a PDF, MOBI (i.e. for Kindles) and EPUB. I don’t believe there is a dead tree version at the time of this review.
Mr. Heisler does a good job introducing us to Python. At first, it sounds like you’ll be learning Python by writing lots of code (which made me think of Zed Shaw’s website), but the author ends up doing what most Python authors do and goes through a bunch of the basics. Anyway, he book is split up into 13 chapters (14 if you count chapter 0!) with some “interlude” sections thrown in here and there. Here’s a breakdown of what’s covered:
Chapter zero is just an introduction. Chapter one covers downloading Python and the basics of using IDLE. Then we hit an interlude that covers comments in the code. Chapters two and three covers strings and string methods (finding strings, slices, etc). Chapter 4 goes into functions and loops. Then there’s another interlude, this time covering the Python debugger: pdb. Chapter 5 does conditionals (i.e. if/elif/else) and also talks about how to break and continue in a loop. Chapter 6 is all about lists and dictionaries. In seven, we learn file I/O and how to read and write CSV files. Then we hit another interlude where the author talks about how to install 3rd party Python modules. For some reason, he recommends easy_install, which I thought had fallen out of favor in the Python community. But there’s no mention of the alternatives, such as pip. Anyway, in chapter 8, we learn how to read, write and manipulate PDFs with pyPDF. There’s a mention of reportlab and PDFMiner, but no examples. Chapter 9 goes into SQL with Python, mostly focusing on SQLite, although it mentions pyodbc, pyscopg and MySQLdb.
Chapter 10 goes into web scraping with Python regular expressions, beautifulsoup and mechanize. Chapter 11 is about scientific programming with Python and graphing. It covers a little NumPy and a little matplotlib. Chapter 12 dabbles in Python GUI work with EasyGUI and Tkinter. I thought EasyGUI was an odd choice as it’s basically just a dialog generator, but anyway. The final chapter covers web applications using the Google App Engine.
Each chapter has multiple sections and the sections usually end with an exercise or two for the reader to try out. The text is written in a very informal way with some fun examples, like writing a L33T translator script. Since this was a KickStarter book, the last few pages list all the supporters who helped get the book published. I thought the book covered an adequate amount of the language to get a new programmer started. It’s not an in-depth Python book, but it’s not supposed to be. It’s there to get the reader started on their Python journey and it does a good job doing just that!