Many experienced programmers try to bend Python to fit patterns they learned from other languages, and never discover Python features outside of their experience. With this book, those Python programmers will thoroughly learn how to become proficient in Python 3.
This book covers:Python data model: understand how special methods are the key to the consistent behavior of objectsData structures: take full advantage of built-in types, and understand the text vs bytes duality in the Unicode ageFunctions as objects: view Python functions as first-class objects, and understand how this affects popular design patternsObject-oriented idioms: build classes by learning about references, mutability, interfaces, operator overloading, and multiple inheritanceControl flow: leverage context managers, generators, coroutines, and concurrency with the concurrent.futures and asyncio packagesMetaprogramming: understand how properties, attribute descriptors, class decorators, and metaclasses work
Written by Mark Lutz—widely recognized as the world’s leading Python trainer—Python Pocket Reference is an ideal companion to O’Reilly’s classic Python tutorials, Learning Python and Programming Python, also written by Mark.
This fifth edition covers:Built-in object types, including numbers, lists, dictionaries, and moreStatements and syntax for creating and processing objectsFunctions and modules for structuring and reusing codePython’s object-oriented programming toolsBuilt-in functions, exceptions, and attributesSpecial operator overloading methodsWidely used standard library modules and extensionsCommand-line options and development toolsPython idioms and hintsThe Python SQL Database API
Why do some games become boring quickly, while others remain fun for years? How do games serve as fundamental and powerful learning tools? Whether you’re a game developer, dedicated gamer, or curious observer, this illustrated, fully updated edition helps you understand what drives this major cultural force, and inspires you to take it further.
You’ll discover that:Games play into our innate ability to seek patterns and solve puzzlesMost successful games are built upon the same elementsSlightly more females than males now play gamesMany games still teach primitive survival skillsFictional dressing for modern games is more developed than the conceptual elementsTruly creative designers seldom use other games for inspirationGames are beginning to evolve beyond their prehistoric origins
You’ll gain a strong foundation in the language, including best practices for testing, debugging, code reuse, and other development tips. This book also shows you how to use Python for applications in business, science, and the arts, using various Python tools and open source packages.Learn simple data types, and basic math and text operationsUse data-wrangling techniques with Python’s built-in data structuresExplore Python code structure, including the use of functionsWrite large programs in Python, with modules and packagesDive into objects, classes, and other object-oriented featuresExamine storage from flat files to relational databases and NoSQLUse Python to build web clients, servers, APIs, and servicesManage system tasks such as programs, processes, and threadsUnderstand the basics of concurrency and network programming
This book is written for Python programmers who want to learn about GUI programming. It is also suitable for those who are new to Python but are familiar with object-oriented programming.What You Will LearnProgram GUI applications in an easy and efficient wayDownload and install PySide, a cross-platform GUI development toolkit for PythonCreate menus, toolbars, status bars, and child windowsDevelop a text editor application on your ownConnect your GUI to a database and manage itExecute SQL queries by handling databasesIn Detail
Elegantly-built GUI applications are always a massive hit among users. PySide is an open source software project that provides Python bindings for the Qt cross-platform UI framework. Combining the power of Qt and Python, PySide provides easy access to the Qt framework for Python developers and also acts as an excellent rapid application development platform.
This book will take you through everything you need to know to develop UI applications. You will learn about installing and building PySide in various major operating systems as well as the basics of GUI programming. The book will then move on to discuss event management, signals and slots, and the widgets and dialogs available with PySide. Database interaction and manipulation is also covered.
By the end of this book, you will be able to program GUI applications efficiently and master how to develop your own applications and how to run them across platforms.Style and approach
This is an accessible and practical guide to developing GUIs for Python applications.