万本电子书0元读

万本电子书0元读

顶部广告

Getting Started with Python and Raspberry Pi电子书

售       价:¥

2人正在读 | 0人评论 9.8

作       者:Dan Nixon

出  版  社:Packt Publishing

出版时间:2015-09-29

字       数:63.3万

所属分类: 进口书 > 外文原版书 > 电脑/网络

温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(0条)
Learn to design and implement reliable Python applications on the Raspberry Pi using a range of external libraries, the Raspberry Pis GPIO port, and the camera module About This Book Learn the fundamentals of Python *ing and application programming Design user-friendly command-line and graphical user interfaces A step-by-step guide to learning Python programming with the Pi Who This Book Is For This book is designed for those who are unfamiliar with the art of Python development and want to get to know their way round the language and the many additional libraries that allow you to get a full application up and running in no time. What You Will Learn Fundamentals of Python applications Designing applications for multi-threading Interacting with electronics and physical devices Debugging applications when they go wrong Packaging and installing Python modules User interface design using Qt Building easy to use command-line interfaces Connecting applications to the Internet In Detail The Raspberry Pi is one of the smallest and most affordable single board computers that has taken over the world of hobby electronics and programming, and the Python programming language makes this the perfect platform to start coding with. The book will start with a brief introduction to Raspberry Pi and Python. We will direct you to the official documentation that helps you set up your Raspberry Pi with the necessary equipment such as the monitor, keyboard, mouse, power supply, and so on. It will then dive right into the basics of Python programming. Later, it will focus on other Python tasks, for instance, interfacing with hardware, GUI programming, and more. Once you get well versed with the basic programming, the book will then teach you to develop Python/Raspberry Pi applications. By the end of this book, you will be able to develop Raspberry Pi applications with Python and will have good understanding of Python programming for Raspberry Pi. Style and approach An easy-to-follow introduction to Python *ing and application development through clear conceptual explanations backed up by real-world examples on the Raspberry Pi.
目录展开

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

累计评论(0条) 0个书友正在讨论这本书 发表评论

发表评论

发表评论,分享你的想法吧!

买过这本书的人还买过

读了这本书的人还在读

回顶部