ebook img

Automate the Boring Stuff with Python: Practical Programming for Total Beginners PDF

783 Pages·2·8.594 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Automate the Boring Stuff with Python: Practical Programming for Total Beginners

AUTOMATE THE BORING STUFF WITH PYTHON 2ND EDITION Practical Programming for Total Beginners by Al Sweigart San Francisco AUTOMATE THE BORING STUFF WITH PYTHON, 2ND EDITION. Copyright © 2020 by Al Sweigart. All rights reserved. No part of this work may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or by any information storage or retrieval system, without the prior written permission of the copyright owner and the publisher. ISBN-10: 1-59327-992-2 ISBN-13: 978-1-59327-992-9 Publisher: William Pollock Production Editor: Laurel Chun Cover Illustration: Josh Ellingson Interior Design: Octopod Studios Developmental Editors: Frances Saux and Jan Cash Technical Reviewers: Ari Lacenski and Philip James Copyeditors: Kim Wimpsett, Britt Bogan, and Paula L. Fleming Compositors: Susan Glinert Stevens and Danielle Foster Proofreaders: Lisa Devoto Farrell and Emelie Burnette Indexer: BIM Indexing and Proofreading Services For information on distribution, translations, or bulk sales, please contact No Starch Press, Inc. directly: No Starch Press, Inc. 245 8th Street, San Francisco, CA 94103 phone: 1.415.863.9900; [email protected] www.nostarch.com The Library of Congress Control Number for the first edition is: 2014953114 No Starch Press and the No Starch Press logo are registered trademarks of No Starch Press, Inc. Other product and company names mentioned herein may be the trademarks of their respective owners. Rather than use a trademark symbol with every occurrence of a trademarked name, we are using the names only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark. The information in this book is distributed on an “As Is” basis, without warranty. While every precaution has been taken in the preparation of this work, neither the author nor No Starch Press, Inc. shall have any liability to any person or entity with respect to any loss or damage caused or alleged to be caused directly or indirectly by the information contained in it. This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 United States License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc- sa/3.0/us/ or send a letter to Creative Commons, PO Box 1866, Mountain View, CA 94042, USA. For my nephew Jack About the Author Al Sweigart is a software developer and tech book author. Python is his favorite programming language, and he is the developer of several open source modules for it. His other books are freely available under a Creative Commons license on his website https://inventwithpython.com/. His cat now weighs 11 pounds. About the Tech Reviewer Philip James has been working in Python for over a decade and is a frequent speaker in the Python community. He speaks on topics ranging from Unix fundamentals to open source social networks. Philip is a Core Contributor to the BeeWare project and lives in the San Francisco Bay Area with his partner Nic and her cat River. BRIEF CONTENTS Acknowledgments Introduction PART I: PYTHON PROGRAMMING BASICS Chapter 1: Python Basics Chapter 2: Flow Control Chapter 3: Functions Chapter 4: Lists Chapter 5: Dictionaries and Structuring Data Chapter 6: Manipulating Strings PART II: AUTOMATING TASKS Chapter 7: Pattern Matching with Regular Expressions Chapter 8: Input Validation Chapter 9: Reading and Writing Files Chapter 10: Organizing Files Chapter 11: Debugging Chapter 12: Web Scraping Chapter 13: Working with Excel Spreadsheets Chapter 14: Working with Google Sheets Chapter 15: Working with PDF and Word Documents Chapter 16: Working with CSV Files and JSON Data Chapter 17: Keeping Time, Scheduling Tasks, and Launching Programs Chapter 18: Sending Email and Text Messages Chapter 19: Manipulating Images Chapter 20: Controlling the Keyboard and Mouse with GUI Automation Appendix A: Installing Third-Party Modules Appendix B: Running Programs Appendix C: Answers to the Practice Questions Index CONTENTS IN DETAIL ACKNOWLEDGMENTS INTRODUCTION Whom Is This Book For? Conventions What Is Programming? What Is Python? Programmers Don’t Need to Know Much Math You Are Not Too Old to Learn Programming Programming Is a Creative Activity About This Book Downloading and Installing Python Downloading and Installing Mu Starting Mu Starting IDLE The Interactive Shell Installing Third-Party Modules How to Find Help Asking Smart Programming Questions Summary PART I: PYTHON PROGRAMMING BASICS 1 PYTHON BASICS Entering Expressions into the Interactive Shell The Integer, Floating-Point, and String Data Types String Concatenation and Replication

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.