Programming in Python 3 - Mark Summerfield

Programming in Python 3

A Complete Introduction to the Python Language
Buch | Softcover
552 Seiten
2008
Addison-Wesley Educational Publishers Inc (Verlag)
978-0-13-712929-4 (ISBN)
36,30 inkl. MwSt
zur Neuauflage
  • Titel erscheint in neuer Auflage
  • Artikel merken
Zu diesem Artikel existiert eine Nachauflage
Python 3 is the best version of the language yet: It is more powerful, convenient, consistent, and expressive than ever before. Now, leading Python programmer Mark Summerfield demonstrates how to write code that takes full advantage of Python 3’s features and idioms. The first book written from a completely “Python 3” viewpoint, Programming in Python 3 brings together all the knowledge you need to write any program, use any standard or third-party Python 3 library, and create new library modules of your own.

 

Summerfield draws on his many years of Python experience to share deep insights into Python 3 development you won’t find anywhere else. He begins by illuminating Python’s “beautiful heart”: the eight key elements of Python you need to write robust, high-performance programs. Building on these core elements, he introduces new topics designed to strengthen your practical expertise–one concept and hands-on example at a time. This book’s coverage includes

 



Developing in Python using procedural, object-oriented, and functional programming paradigms
Creating custom packages and modules
Writing and reading binary, text, and XML files, including optional compression, random access, and text and XML parsing
Leveraging advanced data types, collections, control structures, and functions
Spreading program workloads across multiple processes and threads
Programming SQL databases and key-value DBM files
Utilizing Python’s regular expression mini-language and module
Building usable, efficient, GUI-based applications
Advanced programming techniques, including generators, function and class decorators, context managers, descriptors, abstract base classes, metaclasses, and more

 

Programming in Python 3serves as both tutorial and language reference, and it is accompanied by extensive downloadable example code–all of it tested with the final version of Python 3 on Windows, Linux, and Mac OS X.

Mark Summerfield, owner of Qtrac Ltd., is an independent trainer, consultant, technical editor, and writer specializing in Python, C++, Qt, and PyQt. His books include Rapid GUI Programming with Python and Qt: The Definitive Guide to PyQt Programming (Addison-Wesley, 2008) and, cowritten with Jasmin Blanchette, C++ GUI Programming with Qt 4 (Addison-Wesley, 2006). As Trolltech’s documentation manager, Mark founded and edited Trolltech’s technical journal, Qt Quarterly.

Introduction1

 

Chapter 1: Rapid Introduction to Procedural Programming7

Creating and Running Python Programs 7

Python’s “Beautiful Heart” 12

Examples 36

Summary 42

Exercises 44

 

Chapter 2:Data Types47

Identifiers and Keywords 47

Integral Types 50

Floating-Point Types 54

Strings 61

Examples 88

Summary 95

Exercises 97

 

Chapter 3: Collection Data Types99

Sequence Types 99

Set Types 112

Mapping Types 117

Iterating and Copying Collections 127

Examples 138

Summary 146

Exercises 147

 

Chapter 4: Control Structures and Functions149

Control Structures 149

Exception Handling 153

Custom Functions 161

Example: make_html_skeleton.py 175

Summary 181

Exercise 182

 

Chapter 5: Modules185

Modules and Packages 185

Overview of Python’s Standard Library 202

Summary 219

Exercise 220

 

Chapter 6: Object-Oriented Programming223

The Object-Oriented Approach 224

Custom Classes 228

Custom Collection Classes 251

Summary 272

Exercises 274

 

Chapter 7: File Handling277

Writing and Reading Binary Data 282

Writing and Parsing Text Files 294

Writing and Parsing XML Files 302

Random Access Binary Files 313

Summary 326

Exercises 327

 

Chapter 8: Advanced Programming Techniques329

Further Procedural Programming 330

Further Object-Oriented Programming 353

Functional-Style Programming 384

Example: Valid.py 388

Summary 390

Exercises 392

 

Chapter 9: Processes and Threading395

Delegating Work to Processes 396

Delegating Work to Threads 400

Summary 409

Exercises 410

 

Chapter 10: Networking413

Creating a TCP Client 414

Creating a TCP Server 420

Summary 427

Exercises 427

 

Chapter 11: Database Programming431

DBM Databases 432

SQL Databases 436

Summary 443

Exercise 444

 

Chapter 12: Regular Expressions445

Python’s Regular Expression Language 446

The Regular Expression Module 455

Summary 464

Exercises 465

 

Chapter 13: Introduction to GUI Programming467

Dialog-Style Programs 470

Main-Window-Style Programs 476

Summary 491

Exercises 491

 

Epilogue493

Index495

Erscheint lt. Verlag 23.12.2008
Verlagsort New Jersey
Sprache englisch
Gewicht 984 g
Themenwelt Informatik Programmiersprachen / -werkzeuge Python
Mathematik / Informatik Informatik Web / Internet
ISBN-10 0-13-712929-7 / 0137129297
ISBN-13 978-0-13-712929-4 / 9780137129294
Zustand Neuware
Haben Sie eine Frage zum Produkt?
Mehr entdecken
aus dem Bereich
das umfassende Handbuch

von Johannes Ernesti; Peter Kaiser

Buch | Hardcover (2023)
Rheinwerk (Verlag)
44,90
eine praktische, projektbasierte Programmiereinführung

von Eric Matthes

Buch | Softcover (2023)
dpunkt (Verlag)
32,90
Grundlagen und Praxis der Python-Programmierung

von Paul Barry

Buch | Softcover (2024)
O'Reilly (Verlag)
49,90