Download Beginning Python From Novice to Professional ebook

 

Download Beginning Python From Novice to Professional ebook

Download Beginning Python From Novice to Professional ebook

Download Beginning Python From Novice to Professional ebook

Introduction:

I’ve started this introduction with a few quotes to set the tone for the book—which is rather informal. In the hope of making it an easy read, I’ve tried to approach the topic of Python programming with a healthy dose of humor, and true to the traditions of the Python community, much of this humor is related to Monty Python sketches. As a consequence, some of my examples may seem a bit silly; I hope you will bear with me. (And, yes, the name Python is derived from Monty Python, not from snakes belonging to the family Pythonidae.) In this introduction, I give you a quick look at what Python is, why you should use it, who uses it, who this book’s intended audience is, and how the book is organized.

So, what is Python, and why should you use it? To quote an official blurb (available from http://www.python.org/doc/essays/blurb.html), it is “an interpreted, object-oriented, highlevel programming language with dynamic semantics.” Many of these terms will become clear as you read this book, but the gist of it is that Python is a programming language that knows how to stay out of your way when you write your programs. It enables you to implement the functionality you want without any hassle, and lets you write programs that are clear and readable (much more so than programs in most other currently popular programming languages). Even though Python might not be as fast as compiled languages such as C or C++, what you save in programming time will probably make Python worth using; in most programs the speed difference won’t be noticeable anyway. If you are a C programmer, you can easily implement the critical parts of your program in C at a later date, and have them interoperate with the Python parts. If you haven’t done any programming before (and perhaps are a bit confused by
my references to C and C++), Python’s combination of simplicity and power make it an ideal choice as a place to start.

So, who uses Python? Since Guido van Rossum created the language in the early 1990s, its following has grown steadily, and interest has increased markedly in the last few years. Python is used extensively for system administration tasks (it is, for example, a vital component of several Linux distributions), but it is also used to teach programming to complete beginners. NASA uses Python for several of its software systems, and has adopted it as the standard scripting language for its Integrated Planning System; Industrial Light & Magic uses Python in its production of special effects for large-budget feature films; Yahoo! uses it (among other things) to manage its
discussion groups; and Google has used it to implement many components of its Web crawler and search engine. Python is being used in such diverse areas as computer games and bioinformatics. Soon one might as well ask, who isn’t using it? This book is for those of you who want to learn how to program in Python. It is intended to
suit a wide audience, from neophyte programmer to advanced computer wiz. If you have never programmed before, you should start by reading Chapter 1 and continue until you find that things get too advanced for you (if, indeed, they do). Then you should start practicing, and write some programs of your own. When the time is right, you can return to the book and proceed with the more intricate stuff. If you already know how to program, then some of the introductory material might not be new to you (although there will probably be some surprising details here and there). You could skim through the early chapters to get an idea of how Python works, or perhaps read through
Appendix A, “The Short Version,” which is based on my online Python tutorial “Instant Python.” It will get you up to speed on the most important Python concepts. After getting the big picture, you could jump straight to Chapter 10 (which describes the Python standard libraries). The second half of the book consists of ten programming projects, which show off various capabilities of the Python language. These projects should be of interest to beginner and expert alike. Although some of the material in the later projects may be a bit difficult for an inexperienced
programmer, following the projects in order (after reading the material in the first part of the book) should be possible. The projects touch upon a wide range of topics, most of which will be very useful to you when writing programs of your own. You will learn how to do things that may seem completely out of reach to you at this point, such as creating a chat server, a peer-to-peer file sharing system, or a full-fledged graphical computer game. Although much of the material may seem hard at first glance, I think you will be surprised by how easy most of it really is. If you’d like to download the source code, it’s available from http://www.apress.com. Well, that’s it. I always find long introductions boring myself, so I’ll let you continue with your Pythoneering, either in Chapter 1 or in Appendix A. Good luck, and happy hacking.

This book(Download Beginning Python From Novice to Professional ebook) contains these contents:

Contents:

■CHAPTER 1 Instant Hacking: The Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
■CHAPTER 2 Lists and Tuples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
■CHAPTER 3 Working with Strings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
■CHAPTER 4 Dictionaries: When Indices Won’t Do . . . . . . . . . . . . . . . . . . . . . . . . . . 67
■CHAPTER 5 Conditionals, Loops, and Some Other Statements . . . . . . . . . . . . . . 81
■CHAPTER 6 Abstraction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
■CHAPTER 7 More Abstraction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
■CHAPTER 8 Exceptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
■CHAPTER 9 Magic Methods, Properties, and Iterators . . . . . . . . . . . . . . . . . . . . 173
■CHAPTER 10 Batteries Included . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203
■CHAPTER 11 Files and Stuff . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255
■CHAPTER 12 Graphical User Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269
■CHAPTER 13 Database Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285
■CHAPTER 14 Network Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297
■CHAPTER 15 Python and the Web . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313
■CHAPTER 16 Testing, 1-2-3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 341
■CHAPTER 17 Extending Python . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357
■CHAPTER 18 Packaging Your Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 373
■CHAPTER 19 Playful Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 381

■CHAPTER 23 Project 4: In the News . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 439
■CHAPTER 24 Project 5: A Virtual Tea Party . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 455
■CHAPTER 25 Project 6: Remote Editing with CGI . . . . . . . . . . . . . . . . . . . . . . . . . . . 473
■CHAPTER 26 Project 7: Your Own Bulletin Board . . . . . . . . . . . . . . . . . . . . . . . . . . 483
■CHAPTER 27 Project 8: File Sharing with XML-RPC . . . . . . . . . . . . . . . . . . . . . . . . 499
■CHAPTER 28 Project 9: File Sharing II—Now with GUI! . . . . . . . . . . . . . . . . . . . . 517
■CHAPTER 29 Project 10: Do-It-Yourself Arcade Game . . . . . . . . . . . . . . . . . . . . . . 527
■APPENDIX A The Short Version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 547
■APPENDIX B Python Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 557
■APPENDIX C Online Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 571
■CHAPTER 20 Project 1: Instant Markup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 391
■CHAPTER 21 Project 2: Painting a Pretty Picture . . . . . . . . . . . . . . . . . . . . . . . . . . 411
■CHAPTER 22 Project 3: XML for All Occasions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 421

Download Beginning Python From Novice to Professional ebook

Crash Course Rheumatology and Orthopedics ebook free download pdf

Download Beginning Python From Novice to Professional ebook

Leave a Reply

Your email address will not be published. Required fields are marked *

*