SKIP THE SHIPPING
Use code NOSHIP during checkout to save 40% on eligible eBooks, now through January 5. Shop now.
Register your product to gain access to bonus material or receive a coupon.
Sams Teach Yourself Python in 24 Hours presents 24 hands-on, one-hour lessons that guide you through all the steps needed to learn the Python programming language. The lessons begin with basic Python syntax and language features, and move up through object oriented design and programming. The book ends with a series of chapters covering GUI programming (using Tkinter), Python as a system administration tool, and Python as a programming language for CGI applications.
Introduction.
I. PYTHON MIND, BEGINNER'S MIND.
Hour 1. What Is Python?
Why Program? Why Program in Python? The History of Python. goto Considered Harmful. What Python Is and Is Not Good At. Summary. Workshop. Exercises.
Hour 2. The Python Interpreter.
The Interpreter: A Minimalist Guide. Interactivity and Environment. Running Scripts. Hello, Python! Summary. Workshop. Exercises.
Hour 3. Basic Arithmetic with Python.
Addition and Subtraction. Multiplication, Division, and Modulo. Rounding, floor(), and ceil(). Exponentiation. Parenthesization. "Gotchas" and Other Miscellaneous Topics. Summary. Workshop. Exercises.
Hour 4. Variables and Control Flow.
Variables. if, elif, and else. for and range(). while. break, continue, and pass. A Complete Program. Summary. Workshop. Exercises.
Hour 5. Basic Data Types I: The Numeric Data Types.
Data Types. Numeric Types. Integer. Long Integer. Floating point. Complex. Summary. Workshop. Exercises.
Hour 6. Basic Data Types II: The Sequence and Dictionary Data Types.
Sequence Data Types. Strings. Tuples. Lists. Dictionaries. Arrays. Summary. Workshop. Exercises.
Hour 7. Functions and Modules.
What Do Functions Do? Modules. Summary. Workshop. Exercises.
Hour 8. Useful Miscellany.
Three Functions and a Statement. Printing and Formatting. File Objects. Try and Except. Summary. Workshop. Exercises.
II. OBJECTS IN MIRROR ARE CLOSER THAN THEY APPEAR.
Hour 9. Objects at Rest.
Everything Is an Object. Variables Are References to Objects. Object-Oriented Programming. Summary. Workshop. Exercises.
Hour 10. Defining Objects.
First Class. Modifying the Class. A Class Divided. Changing the Name of Arkansas. Summary. Workshop. Exercises.
Hour 11. Object-Oriented Programming Concepts.
Identity. Encapsulation. Namespaces and Scope. Summary. Workshop. Exercises.
Hour 12. More OOP Concepts.
Data Hiding with "Private" Variables. Polymorphism. Multiple Inheritance. Summary. Workshop. Exercises.
Hour 13. Special Class Methods in Python.
Operators and Operator Overloading. Using Special Methods. The Special Methods. Summary. Workshop. Exercises.
Hour 14. The Laboratory of Dr. Frankenstein.
Making Reusable Components. Summary. Workshop. Exercises.
Hour 15. The Laboratory, Part II.
Making Reusable Components, Continued. Documenting Your Components. Testing Your Components. Finding Components Built by Others. Summary. Workshop. Exercises.
Hour 16. Objects in Motion.
A Complete Application. Command-Line Interface. Summary. Workshop. Exercises.
III. INTRODUCING THE PYTHON GUI.
Hour 17. Introducing the Python GUI.
The GUI Programming Model. Events. Callbacks. Summary. Workshop. Exercises.
Hour 18. Tk Widgets I.
Windows and Widgets. The Button Widget. The Canvas Widget. The Checkbutton Widget. The Entry Widget. The Frame Widget. The Label Widget. The Listbox Widget. Tkinter Variables. The Menu and Menubutton Widgets. The MessageBox Widgets. Summary. Workshop. Exercises.
Hour 19. Tk Widgets II.
The Radio Button Widget. The Scale Widget. The Text, Scrollbar, and ScrolledText Widgets. Scrollbars. The Toplevel Widget. Summary. Workshop. Exercises.
Hour 20. Tk Graphics I.
New Menus. Scrolling a Listbox Widget. The Python Imaging Library. The Canvas Widget. Summary. Workshop. Exercises.
Hour 21. Tk Graphics II.
Color. Animation. Summary. Workshop. Exercises.
Hour 22. Tk Graphics III.
More Animation. The Geometry Managers. Summary. Workshop. Exercises.
Hour 23. The Mandelbrot Set.
The Mandelbrot Set. Mathematics. The Mandelbrot Program. Julia Sets. Summary. Workshop. Exercises.
Hour 24. Miscellany.
CGI. Debugging. Right Practice. Right Attitude. Right Understanding. Summary. Workshop. Exercises.
IV. APPENDIXES.
Appendix A. Selected Bibliography.
Appendix B. Editors for Python.
vi and vim. Emacs. Xemacs. Alpha. IDLE.
Appendix C. Reserved Words and Identifiers in Python.
Reserved Words. Reserved Identifiers. Built-in Names.
Appendix D. Special Class Methods in Python.
Appendix E. Other Python Resources.
Index.