This edition first published 2015
© 2015 Craig Richardson
Registered office
John Wiley & Sons Ltd, The Atrium, Southern Gate, Chichester, West Sussex, PO19 8SQ, United Kingdom
For details of our global editorial offices, for customer services and for information about how to apply for permission to reuse the copyright material in this book please see our website at www.wiley.com.
The right of the author to be identified as the author of this work has been asserted in accordance with the Copyright, Designs and Patents Act 1988.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording or otherwise, except as permitted by the UK Copyright, Designs and Patents Act 1988, without the prior permission of the publisher.
Wiley also publishes its books in a variety of electronic formats. Some content that appears in print may not be available in electronic books.
Designations used by companies to distinguish their products are often claimed as trademarks. All brand names and product names used in this book are trade names, service marks, trademarks or registered trademarks of their respective owners. The publisher is not associated with any product or vendor mentioned in this book. This publication is designed to provide accurate and authoritative information in regard to the subject matter covered. It is sold on the understanding that the publisher is not engaged in rendering professional services. If professional advice or other expert assistance is required, the services of a competent professional should be sought.
Trademarks: Wiley and the Wiley logo are trademarks or registered trademarks of John Wiley & Sons, Inc. and/or its affiliates in the United States and/or other countries, and may not be used without written permission. Python is a registered trademark of the PSF (Python Software Foundation). Raspberry Pi and the Raspberry Pi Logo are a registered trademark of the Raspberry Pi Foundation, which is a UK registered charity. All other trademarks are the property of their respective owners. John Wiley & Sons, Ltd. is not associated with any product or vendor mentioned in the book.
A catalogue record for this book is available from the British Library.
ISBN 978-1-118-95179-8 (paperback); ISBN 978-1-118-95184-2 (ePub); 978-1-118-95185-9 (ePDF)
To the swans on the river Cam. May you never visit the Fellows of St John's College.
Some of the people who helped bring this book to market include the following:
Editorial and Production
VP Consumer and Technology Publishing Director: Michelle Leete
Associate Director–Book Content Management: Martin Tribe
Associate Publisher: Jim Minatel
Series Creator: Carrie Anne Philbin
Executive Editor: Craig Smith
Project Editor: Kezia Endsley
Copy Editor: Kezia Endsley
Technical Editor: Alex Bradbury
Editorial Manager: Jodi Jensen
Senior Project Editor: Sara Shlaer
Editorial Assistant: Claire Johnson
Proofreader: Wordsmith Editorial
Marketing
Marketing Manager: Lorna Mein
Marketing Assistant: Polly Thomas
CRAIG RICHARDSON is a freelance software developer and writer based in the UK. When Craig first started using computers in his early teens he had a typing speed of one word a minute and successfully broke several machines. Since then he’s studied computer science and software development at school and university and has taught hundreds of people to program with Python. He also now knows how to fix the many computers he breaks.
This book would not have been possible without the support of my friends and family. Cambridge Make Space has been invaluable: the reliability of the old Internet connection really helped me finish the book. I’d also like to thank the book’s editors and members of staff at Wiley for their hard work.
3.143.235.23