没有合适的资源?快使用搜索试试~ 我知道了~
Automate the Boring Stuff with Python 原版PDF by Sweigart
5星 · 超过95%的资源 需积分: 17 92 下载量 84 浏览量
2018-05-05
10:01:42
上传
评论 4
收藏 16.4MB PDF 举报
温馨提示
试读
501页
“You’ve just done in two hours what it takes the three of us two days to do.” My college roommate was working at a retail electronics store in the early 2000s. Occasionally, the store would receive a spreadsheet of thousands of product prices from its competitor. A team of three employees would print the spreadsheet onto a thick stack of paper and split it among themselves. For each product price, they would look up their store’s price and note all the products that their competitors sold for less. It usually took a couple of days.
资源推荐
资源详情
资源评论
PRACTICAL PROGRAMMING
FOR TOTAL
BEGINNERS
AL SWEIGART
AUTOMATE
THE BORING STUFF
WITH PYTHON
AUTOMATE
THE BORING STUFF
WITH PYTHON
SHELVE IN:
PROGRAMMING LANGUAGES/
PYTHON
$29.95 ($34.95 CDN)
www.nostarch.com
THE F INE ST I N G EEK E NTERTAI NM E NT
™
If you’ve ever spent hours renaming files or updating
hundreds of spreadsheet cells, you know how tedious
tasks like these can be. But what if you could have
your computer do them for you?
minutes what would take you hours to do by hand—
learn how to use Python to write programs that do in
In Automate the Boring Stuff with Python, you’ll
no prior programming experience required. Once
create Python programs that effortlessly perform
useful and impressive feats of automation to:
“I LI E FLAT.”
This book uses a durable binding that won’t snap shut.
you’ve mastered the basics of programming, you’ll
• Search for text in a file or across multiple files
• Create, update, move, and rename files and
folders
• Search the Web and download online content
• Update and format data in Excel spreadsheets
of any size
Don’t spend your time doing work a well-trained
monkey could do. Even if you’ve never written a line
• Send reminder emails and text notifications
• Fill out online forms
Step-by-step instructions walk you through each
program, and practice projects at the end of each
chapter challenge you to improve those programs and
use your newfound skills to automate similar tasks.
• Split, merge, watermark, and encrypt PDFs
GET STUFF DONE.
LEARN PYTHON.
GET STUFF DONE.
LEARN PYTHON.
COVERS PYTHON 3
of code, you can make your computer do the grunt work.
Learn how in Automate the Boring Stuff with Python.
Python books for beginners, including Hacking Secret
A B O U T T H E A U T H O R
Al Sweigart is a software developer and teaches pro-
gramming to kids and adults. He has written several
Ciphers with Python, Invent Your Own Computer Games
with Python, and Making Games with Python & Pygame.
AUTOMATE THE BORING
STUFF WITH PYTHON
AUTOMATE THE BORING
STUFF WITH PYTHON
SWEIGART
SFI-00000
AUTOMATE THE
BORING STUFF
WITH PYTHON
Practical Programming
for Total Beginners
by Al Sweigart
San Francisco
AutomAte the Boring Stuff with Python. Copyright © 2015 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.
Printed in USA
Second printing
19 18 17 16 15 2 3 4 5 6 7 8 9
ISBN-10: 1-59327-599-4
ISBN-13: 978-1-59327-599-0
Publisher: William Pollock
Production Editor: Laurel Chun
Cover Illustration: Josh Ellingson
Interior Design: Octopod Studios
Developmental Editors: Jennifer Griffith-Delgado, Greg Poulos, and Leslie Shen
Technical Reviewer: Ari Lacenski
Copyeditor: Kim Wimpsett
Compositor: Susan Glinert Stevens
Proofreader: Lisa Devoto Farrell
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: 415.863.9900; info@nostarch.com
www.nostarch.com
Library of Congress Control Number: 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.
SFI-00000
BRIEF CONTENTS
Acknowledgments ...................................................xxiii
Introduction ..........................................................1
PART I: PYTHON PROGRAMMING BASICS............................... 11
Chapter 1: Python Basics ...............................................13
Chapter 2: Flow Control ................................................31
Chapter 3: Functions ..................................................61
Chapter 4: Lists ......................................................79
Chapter 5: Dictionaries and Structuring Data.................................105
Chapter 6: Manipulating Strings .........................................123
PART II: AUTOMATING TASKS....................................... 145
Chapter 7: Pattern Matching with Regular Expressions ..........................147
Chapter 8: Reading and Writing Files .....................................173
Chapter 9: Organizing Files ............................................197
Chapter 10: Debugging ...............................................215
Chapter 11: Web Scraping ............................................233
Chapter 12: Working with Excel Spreadsheets ...............................265
Chapter 13: Working with PDF and Word Documents ..........................295
Chapter 14: Working with CSV Files and JSON Data ..........................319
Chapter 15: Keeping Time, Scheduling Tasks, and Launching Programs ..............335
Chapter 16: Sending Email and Text Messages...............................361
Chapter 17: Manipulating Images ........................................387
Chapter 18: Controlling the Keyboard and Mouse with GUI Automation .............413
Appendix A: Installing Third-Party Modules ..................................441
Appendix B: Running Programs ..........................................443
Appendix C: Answers to the Practice Questions...............................447
Index ............................................................461
剩余500页未读,继续阅读
资源评论
- Ceci_Tian2019-01-26可以,清晰,谢啦
- qq_177734832019-02-20资源非常号。英文原版,有标签目录。
- 江湖老炮2019-04-02很清晰,文档很详细,推荐下载
nn123456789
- 粉丝: 14
- 资源: 128
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功