CHF16.90
Download steht sofort bereit
Python Programming for Raspberry Pi®
In just 24 sessions of one hour or less, Sams Teach Yourself Python Programming for Raspberry Pi in 24 Hours teaches you Python programming on Raspberry Pi, so you can start creating awesome projects for home automation, home theater, gaming, and more. Using this book's straight-forward, step-by-step approach, you'll move from the absolute basics all the way through network and web connections, multimedia, and even connecting with electronic circuits for sensing and robotics. Every lesson and case study application builds on what you've already learned, giving you a rock-solid foundation for real-world success!
Christine Bresnahan began working as a systems administrator more than 25 years ago. Now an Adjunct Professor at Ivy Tech Community College, she teaches Python programming, Linux administration and computer security. She is coauthor of The Linux Bible, Eighth Edition. With Blum, she also coauthored Linux Command Line & Shell Scripting Bible, Second Edition.
On the Web:
Register your book at informit.com/title/9780672337642 for access to all code examples from the book, as well as update and corrections as they become available.
Autorentext
Richard Blum has worked in the IT industry for more than 30 years as a network and systems administrator, managing Microsoft, Unix, Linux, and Novell servers for a network with more than 3,500 users. He has developed and teaches programming and Linux courses via the Internet to colleges and universities worldwide. Rich has a master's degree in management information systems from Purdue University and is the author of several Linux books, including Linux Command Line and Shell Scripting Bible (coauthored with Christine Bresnahan); Linux for Dummies, Ninth Edition; and Professional Linux Programming (coauthored with Jon Masters). When he's not busy being a computer nerd, Rich enjoys spending time with his wife, Barbara, and two daughters, Katie Jane and Jessica.
Christine Bresnahan started working in the IT industry more than 30 years ago as a system administrator. Christine is currently an adjunct professor at Ivy Tech Community College in Indianapolis, Indiana, teaching Python programming, Linux system administration, and Linux security classes. Christine produces Unix/Linux educational material and is the author of Linux Bible, Eighth Edition (coauthored with Christopher Negus) and Linux Command Line and Shell Scripting Bible (coauthored with Richard Blum). She has been an enthusiastic owner of a Raspberry Pi since 2012.
Inhalt
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Programming with Python . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Who Should Read This Book? . . . . . . . . . . . . . . . . . . . . . . 3 Conventions Used in This Book . . . . . . . . . . . . . . . . . . . . . . . . 3 Part I: Python Programming on the Raspberry Pi HOUR 1: Setting Up the Raspberry Pi . . . . . . . . . . . . . . . . . . . . . . 5 Obtaining a Raspberry Pi . . . . . . . . . . . . . . . . . . . . . . . 5 Acquiring a Raspberry Pi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 Determining the Necessary Peripherals . . . . . . . . . . . . . . . . . . . . . . . 10 Nice Additional Peripherals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Deciding How to Purchase Peripherals . . . . . . . . . . . . . . . . . 18 Getting Your Raspberry Pi Working . . . . . . . . . . . . . . . . . . . 18 Troubleshooting Your Raspberry Pi . . . . . . . . . . . . . . . . . . . . . . . 24 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 Q&A . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 Workshop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 HOUR 2: Understanding the Raspbian Linux Distribution . . . . . . . . . . . . . . . . . 29 Learning About Linux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 Interacting with the Raspbian Command Line . . . . . . . . . . . .. . . . 30 Interacting with the Raspbian GUI . . . . . . . . . . . . . . . .. . . . . . . . . 35 The LXDE Graphical Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 Q&A . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 Workshop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 HOUR 3: Setting Up a Programming Environment . . . . . . . . . . . . . . . . . . . 47 Exploring Python . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 Checking Your Python Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 Installing Python and Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 Learning About the Python Interpreter . . . . . . . . . . . . . . . . . . . . . . . . . 52 Learning About the Python Interactive Shell . . . . . . . . . .. . . . . . . . . . . . . 53 Learning About the Python Development Environment . . . . . . . . . . . . . 57 Creating and Running Python Scripts . . . . . . . . . . . . . .. . . . . . . . . . . 63 Knowing Which Tool to Use and When . . . . . . . . . .. . . . . . . . . 68 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 Q&A . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 Workshop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 Part II: Python Fundamentals HOUR 4: Understanding Python Basics . . . . . . . . . . .. . . . . . . . . . . . . . 73 Producing Python Script Output . . . . . . . . . . . . . . . . . . . . . . . . . . 73 Formatting Scripts for Readability . . . . . . . . . . . . . . . . . . . . . 80 Understanding Python Variables . . . . . . . . . . . . . . . . . . . . . . . . 83 Assigning Value to Python Variable…