Gain a fundamental understanding of Python's syntax and features with this up-to-date introduction and practical reference. Covering a wide array of Python-related programming topics, including addressing language internals, database integration, network programming, and web services, you'll be guided by sound development principles. Ten accompanying projects will ensure you can get your hands dirty in no time.
Updated to reflect the latest in Python programming paradigms and several of the most crucial features found in Python 3,
Beginning Python also covers advanced topics such as extending Python and packaging/distributing Python applications.
What You'll Learn
- Become a proficient Python programmer by following along with a friendly, practical guide to the language's key features
- Write code faster by learning how to take advantage of advanced features such as magic methods, exceptions, and abstraction
- Gain insight into modern Python programming paradigms including testing, documentation, packaging, and distribution
- Learn by following along with ten interesting projects, including a P2P file-sharing application, chat client, video game, remote text editor, and more
Who This Book Is For
Programmers, novice and otherwise, seeking a comprehensive introduction to the Python programming language.
Magnus Lie Hetland is an experienced Python programmer, having used the language since the late 1990s. He is also an associate professor of algorithms at the Norwegian University of Science and Technology, having taught algorithms for the better part of a decade. Hetland is the author of Practical Python and Beginning Python, first and second editions, as well as several scientific papers.
Ch. 1 Instant hacking : the basics
Ch. 2 Lists and tuples
Ch. 3 Working with strings
Ch. 4 Dictionaries : when indices won't do
Ch. 5 Conditionals, loops, and some other statements
Ch. 6 Abstraction
Ch. 7 More abstraction
Ch. 8 Exceptions
Ch. 9 Magic methods, properties, and iterators
Ch. 10 Batteries included
Ch. 11 Files and stuff
Ch. 12 Graphical user interfaces
Ch. 13 Database support
Ch. 14 Network programming
Ch. 15 Python and the Web
Ch. 16 Testing, 1-2-3
Ch. 17 Extending Python
Ch. 18 Packaging your programs
Ch. 19 Playful programming
Ch. 20 Project 1 : instant markup
Ch. 21 Project 2 : painting a pretty picture
Ch. 22 Project 3 : XML for all occasions
Ch. 23 Project 4 : in the news
Ch. 24 Project 5 : a virtual tea party
Ch. 25 Project 6 : remote editing with CGI
Ch. 26 Project 7 : your own bulletin board
Ch. 27 Project 8 : file sharing with XML-RPC
Ch. 28 Project 9 : file sharing II - now with GUI!
Ch. 29 Project 10 : do-it-yourself arcade game
Appendix A : The Short Version
Appendix B : Python Reference