Cover Page: i
Introduction Page: ii
About This Book Page: 1
Foolish Assumptions Page: 2
Icons Used in This Book Page: 3
Beyond the Book Page: 3
Where to Go from Here Page: 4
Part 1: Getting Started with Python Page: 5
Chapter 1: Talking to Your Computer Page: 6
Understanding Why You Want to Talk to Your Computer Page: 8
Knowing that an Application is a Form of Communication Page: 9
Defining What an Application Is Page: 11
Understanding Why Python is So Cool Page: 14
Chapter 2: Getting Your Own Copy of Python Page: 20
Downloading the Version You Need Page: 21
Installing Python Page: 24
Accessing Python on Your Machine Page: 31
Testing Your Installation Page: 35
Chapter 3: Interacting with Python Page: 36
Opening the Command Line Page: 38
Typing a Command Page: 43
Using Help Page: 46
Closing the Command Line Page: 51
Chapter 4: Writing Your First Application Page: 53
Understanding Why IDEs Are Important Page: 56
Obtaining Your Copy of Anaconda Page: 58
Downloading the Datasets and Example Code Page: 64
Creating the Application Page: 71
Understanding the Use of Indentation Page: 75
Adding Comments Page: 77
Closing Jupyter Notebook Page: 80
Chapter 5: Working with Anaconda Page: 81
Downloading Your Code Page: 84
Working with Checkpoints Page: 85
Manipulating Cells Page: 86
Changing Jupyter Notebook’s Appearance Page: 90
Interacting with the Kernel Page: 94
Obtaining Help Page: 95
Using the Magic Functions Page: 97
Viewing the Running Processes Page: 99
Part 2: Talking the Talk Page: 101
Chapter 6: Storing and Modifying Information Page: 102
Storing Information Page: 104
Defining the Essential Python Data Types Page: 105
Working with Dates and Times Page: 111
Chapter 7: Managing Information Page: 112
Controlling How Python Views Data Page: 114
Working with Operators Page: 115
Creating and Using Functions Page: 123
Getting User Input Page: 132
Chapter 8: Making Decisions Page: 133
Making Simple Decisions by Using the if Statement Page: 136
Choosing Alternatives by Using the if…else Statement Page: 141
Using Nested Decision Statements Page: 146
Chapter 9: Performing Repetitive Tasks Page: 149
Processing Data Using the for Statement Page: 152
Processing Data by Using the while Statement Page: 159
Nesting Loop Statements Page: 162
Chapter 10: Dealing with Errors Page: 164
Knowing Why Python Doesn’t Understand You Page: 166
Considering the Sources of Errors Page: 167
Catching Exceptions Page: 171
Raising Exceptions Page: 189
Creating and Using Custom Exceptions Page: 191
Using the finally Clause Page: 192
Part 3: Performing Common Tasks Page: 195
Chapter 11: Interacting with Packages Page: 196
Creating Code Groupings Page: 198
Importing Packages Page: 202
Finding Packages on Disk Page: 207
Downloading Packages from Other Sources Page: 209
Viewing the Package Content Page: 216
Viewing Package Documentation Page: 219
Chapter 12: Working with Strings Page: 223
Understanding That Strings Are Different Page: 226
Creating Stings with Special Characters Page: 229
Selecting Individual Characters Page: 231
Slicing and Dicing Strings Page: 233
Locating a Value in a String Page: 236
Formatting Strings Page: 238
Chapter 13: Managing Lists Page: 241
Organizing Information in an Application Page: 244
Creating Lists Page: 246
Accessing Lists Page: 248
Looping through Lists Page: 249
Modifying Lists Page: 250
Searching Lists Page: 254
Sorting Lists Page: 255
Printing Lists Page: 257
Working with the Counter Object Page: 259
Chapter 14: Collecting All Sorts of Data Page: 260
Understanding Collections Page: 262
Working with Tuples Page: 263
Working with Dictionaries Page: 266
Creating Stacks Using Lists Page: 273
Working with queues Page: 275
Working with deques Page: 278
Chapter 15: Creating and Using Classes Page: 279
Understanding the Class as a Packaging Method Page: 282
Considering the Parts of a Class Page: 284
Creating a Class Page: 296
Using the Class in an Application Page: 298
Extending Classes to Make New Classes Page: 299
Part 4: Performing Advanced Tasks Page: 303
Chapter 16: Storing Data in Files Page: 304
Understanding How Permanent Storage Works Page: 306
Creating Content for Permanent Storage Page: 308
Creating a File Page: 311
Reading File Content Page: 314
Updating File Content Page: 317
Deleting a File Page: 321
Chapter 17: Sending an Email Page: 322
Understanding What Happens When You Send Email Page: 324
Creating the Email Message Page: 335
Seeing the Email Output Page: 338
Part 5: The Part of Tens Page: 341
Chapter 18: Ten Amazing Programming Resources Page: 342
Working with the Python Documentation Online Page: 344
Using the LearnPython.org Tutorial Page: 345
Performing Web Programming by Using Python Page: 346
Getting Additional Libraries Page: 346
Creating Applications Faster by Using an IDE Page: 348
Checking Your Syntax with Greater Ease Page: 348
Using XML to Your Advantage Page: 349
Getting Past the Common Python Newbie Errors Page: 350
Understanding Unicode Page: 351
Making Your Python Application Fast Page: 352
Chapter 19: Ten Ways to Make a Living with Python Page: 352
Working in QA Page: 354
Becoming the IT Staff for a Smaller Organization Page: 355
Performing Specialty Scripting for Applications Page: 355
Administering a Network Page: 356
Teaching Programming Skills Page: 357
Helping People Decide on Location Page: 357
Performing Data Mining Page: 358
Interacting with Embedded Systems Page: 358
Carrying Out Scientific Tasks Page: 359
Performing Real-Time Analysis of Data Page: 359
Chapter 20: Ten Tools That Enhance Your Python Experience Page: 360
Tracking Bugs with Roundup Issue Tracker Page: 362
Creating a Virtual Environment by Using VirtualEnv Page: 363
Installing Your Application by Using PyInstaller Page: 364
Building Developer Documentation by Using pdoc Page: 365
Developing Application Code by Using Komodo Edit Page: 366
Debugging Your Application by Using pydbgr Page: 367
Entering an Interactive Environment by Using IPython Page: 368
Testing Python Applications by Using PyUnit Page: 368
Tidying Your Code by Using Isort Page: 369
Providing Version Control by Using Mercurial Page: 370
Chapter 21: Ten (Plus) Libraries You Need to Know About Page: 370
Developing a Secure Environment by Using PyCrypto Page: 372
Interacting with Databases by Using SQLAlchemy Page: 372
Seeing the World by Using Google Maps Page: 373
Adding a Graphical User Interface by Using TkInter Page: 373
Providing a Nice Tabular Data Presentation by Using PrettyTable Page: 374
Enhancing Your Application with Sound by Using PyAudio Page: 374
Manipulating Images by Using PyQtGraph Page: 375
Locating Your Information by Using IRLib Page: 376
Creating an Interoperable Java Environment by Using JPype Page: 377
Accessing Local Network Resources by Using Twisted Matrix Page: 378
Accessing Internet Resources by Using Libraries Page: 378
About the Authors Page: 393
Connect with Dummies Page: 396
End User License Agreement Page: 396
The easy way to learn programming fundamentals with Python
Python is a remarkably powerful and dynamic programming language that's used in a wide variety of application domains. Some of its key distinguishing features include a very clear, readable syntax, strong introspection capabilities, intuitive object orientation, and natural expression of procedural code. Plus, Python features full modularity, supporting hierarchical packages, exception-based error handling, and modules easily written in C, C++, Java, R, or .NET languages, such as C#. In addition, Python supports a number of coding styles that include: functional, imperative, object-oriented, and procedural.
Due to its ease of use and flexibility, Python is constantly growing in popularity--and now you can wear your programming hat with pride and join the ranks of the pros with the help of this guide. Inside, expert author John Paul Mueller gives a complete step-by-step overview of all there is to know about Python. From performing common and advanced tasks, to collecting data, to interacting with package--this book covers it all!
- Use Python to create and run your first application
- Find out how to troubleshoot and fix errors
- Learn to work with Anaconda and use Magic Functions
- Benefit from completely updated and revised information since the last edition
If you've never used Python or are new to programming in general, Beginning Programming with Python For Dummies is a helpful resource that will set you up for success.