CHF29.00
Download est disponible immédiatement
A guide to completing Python projects for those ready to take their skills to the next level Python Projects is the ultimate resource for the Python programmer with basic skills who is ready to move beyond tutorials and start building projects. The preeminent guide to bridge the gap between learning and doing, this book walks readers through the "where" and "how" of real-world Python programming with practical, actionable instruction. With a focus on real-world functionality, Python Projects details the ways that Python can be used to complete daily tasks and bring efficiency to businesses and individuals alike. Python Projects is written specifically for those who know the Python syntax and lay of the land, but may still be intimidated by larger, more complex projects. The book provides a walk-through of the basic set-up for an application and the building and packaging for a library, and explains in detail the functionalities related to the projects. Topics include: *How to maximize the power of the standard library modules *Where to get third party libraries, and the best practices for utilization *Creating, packaging, and reusing libraries within and across projects *Building multi-layered functionality including networks, data, and user interfaces *Setting up development environments and using virtualenv, pip, and more Written by veteran Python trainers, the book is structured for easy navigation and logical progression that makes it ideal for individual, classroom, or corporate training. For Python developers looking to apply their skills to real-world challenges, Python Projects is a goldmine of information and expert insight.
Auteur
Laura Cassell is the founder of PyLadies Atlanta. She
taught Python and JavaScript for Big Nerd Ranch, and is now an
engineering manager for the Python team at New Relic.
Alan Gauld is an enterprise architect working in the
telecommunications and customer service industries. He has used
Python since 1998, and is a moderator and active participant in the
python-tutor mailing list.
Wrox guides are crafted to make learning programming
languages and technologies easier than you think. Written by
programmers for programmers, they provide a structured, tutorial
format that will guide you through all the techniques involved.
Texte du rabat
Boost your Python skills with practical real-world projects
Bridging the gap between learning and doing, this book walks you through the where and how of real-world Python programming with practical, actionable guidance. Focused on functionality, the hands-on instruction covers the basic application set-up and library construction and packaging to help you move beyond tutorials and start building projects, with the help of veteran Python trainers who provide valuable insight along the way. You should be familiar with the basic syntax of the core Python language, and ready to develop your skills to become proficient in the practical application of this top programming language.
Python Projects:
Join our Programmer to Programmer forums to ask and answer programming questions about this book, join discussions on the hottest topics in the industry, and connect with fellow programmers from around the world.
Code Downloads
Take advantage of free code samples from this book, as well as code samples from hundreds of other books, all ready to use.
Read More
Find articles, e-books, sample chapters and tables of contents for hundreds of books, and more reference resources on programming topics that matter to you.
Contenu
INTRODUCTION xxv
CHAPTER 1: REVIEWING CORE PYTHON 1
Exploring the Python Language and the Interpreter 2
Reviewing the Python Data Types 3
Numeric Types: Integer and Float 4
The Boolean Type 5
The None Type 6
Collection Types 6
Strings 7
Bytes and ByteArrays 8
Tuples 10
Lists 10
Dictionaries 12
Sets 13
Using Python Control Structures 15
Structuring Your Program 15
Using Sequences, Blocks and Comments 16
Selecting an Execution Path 17
Iteration 18
Handling Exceptions 20
Managing Context 21
Getting Data In and Out of Python 21
Interacting with Users 21
Using Text Files 23
Extending Python 24
Defining and Using Functions 24
Generator Functions 26
Lambda Functions 27
Defining and Using Classes and Objects 28
Creating and Using Modules and Packages 33
Using and Creating Modules 33
Using and Creating Packages 34
Creating an Example Package 36
Using ThirdParty Packages 42
Summary 43
CHAPTER 2: SCRIPTING WITH PYTHON 47
Accessing the Operating System 48
Obtaining Information about Users and Their Computer 49
Obtaining Information about the Current Process 53
Managing Other Programs 55
Managing Subprocesses More Effectively 58
Obtaining Information about Files (and Devices) 60
Navigating and Manipulating the File system 62
Plumbing the Directory Tree Depths 69
Working with Dates and Times 72
Using the time Module 72
Introducing the datetime Module 75
Introducing the calendar Module 76
Handling Common File Formats 76
Using CommaSeparated Values 76
Working with Confi g Files 83
Working with XML and HTML Files 86
Parsing XML Files 86
Parsing HTML Files 89
Accessing Native APIs with ctypes and pywin32 93
Accessing the Operating System Libraries 94
Using ctypes with Windows 95
Using ctypes on Linux 96
Accessing a Windows Application Using COM 96
Automating Tasks Involving Multiple Applications 98
Using Python First 98
Using Operating System Utilities 98
Using Data Files 98
Using a ThirdParty Module 99
Interacting with Subprocesses via a CLI 99
Using Web Services for ServerBased Applications 99
Using a Native Code API 100
Using GUI Robotics 100
Summary 100
CHAPTER 3: MANAGING DATA 103
Storing Data Using Python 104
Using DBM as a Persistent Dictionary 104
Using Pickle to Store and Retrieve Objects 109
Accessing Objects with shelve 111
Analyzing Data with Python 116
Analyzing Data Using BuiltIn Features of Python 116
Analyzing Data with ittertools 119
Utility Functions 119
Data Processing Functions 121
Taming the Vagaries of groupby() 122
Using itertools to Analyze LendyDB Data 124
Managing Data Using SQL 125
Relational Database Concepts 126
Structured Query Language 127
Creating Tables 128
Inserting Data 129
Reading Data 130
Modifying Data 133
Linking Data across Tables 134
Digging Deeper into Data Constraints 134
Revisiting SQLite Field Types 135
Modeling Relationships with Constraints 136
ManytoMany Relationships 140
Migrating LendyDB to an SQL Database 143
Accessing SQL from Python 143
Using SQL Connections 143
Using a Cursor 143
Creating the LendyDB SQL Database 145
Inserting Test Data 146 Creating a L...