售 价:¥
温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印
为你推荐
Getting Started with Python and Raspberry Pi
Table of Contents
Getting Started with Python and Raspberry Pi
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Your First Steps with Python on the Pi
Installing and setting up Raspbian
Writing to the SD card
Windows
Linux and Mac
Booting the Pi for the first time
The Python development tools
Python 2 versus Python 3
Running some simple Python scripts
Summary
2. Understanding Control Flow and Data Types
Data in Python
Numerical types
Operations on numerical types
String manipulation
String functions
String formatting
String templates
Control flow operators
Using functions
Summary
3. Working with Data Structures and I/O
Data structures
Lists
Creating lists
List operations
Dictionaries
Creating dictionaries
Dictionary operations
Sets
Set operations
Frozen sets
Tuples
Input/output
The os.path module
Reading and writing files
Summary
4. Understanding Object-oriented Programming and Threading
Object-oriented programming
Classes in Python
Operation.py
Calculator.py
Using the module
Inheritance
Threading
Locks
Summary
5. Packaging Code with setuptools
Using packages in your Python code
Importing modules
Installing modules manually
Installing modules using pip
Installing modules using apt
Packaging your own Python modules
Packaging a library
Adding an entry point
Summary
6. Accessing the GPIO Pins
Digital electronics
The GPIO library
Single LED output
PWM output
Multiple outputs
Basic switch
Switch using interrupt
Universal Asynchronous Receiver/Transmitter (UART)
Setting up the serial port
Using pySerial
Additional libraries
Summary
7. Using the Camera Module
Setting up the camera module
Installing and testing the Python library
Writing applications for the camera
A time lapse recorder
A point-and-shoot camera
An image effect randomizer
Summary
8. Extracting Data from the Internet
Using urllib2 to download data
Parsing JSON APIs
Parsing XML APIs
The DOM method
The SAX method
Parsing a web page using BeautifulSoup
Summary
9. Creating Command-line Interfaces
Unit conversion application
Command-line interface
Summary
10. Debugging Applications with PDB and Log Files
The Python debugger
Writing log files
Unit testing
Summary
11. Designing Your GUI with Qt
Setting up the codebase
Building the UI with Qt Designer
Writing the UI code
Launching the UI
Packaging the code
Summary
Index
买过这本书的人还买过
读了这本书的人还在读
同类图书排行榜