Стандартная библиотека Python 3
В состав каждого дистрибутива Python входит стандартная библиотека. Она содержит сотни модулей, которые предоставляют инструменты, предназначенные для взаимодействия с операционной системой, интерпретатором и Интернетом. Все они тщательно протестированы и готовы к немедленному использованию в приложениях.
Книга рассчитана на программистов средней квалификации, разрабатывающих программы на языке Python. В связи с этим, несмотря на то что каждый из приведенных примеров сопровождается обсуждением, объяснение отдельных строк кода приводится лишь в редких случаях. Во всех разделах основное внимание уделено демонстрации возможностей модулей на примере полностью автономных фрагментов исходного кода, обеспечивающих получение конечного результата.
Оглавление.
Глава 1. Текст
Глава 2. Структуры данных
Глава 3. Алгоритмы
Глава 4. Дата и время
Глава 5. Математика
Глава 6. Файловая система
Глава 7. Постоянное хранение и обмен данными
Глава 8. Сжатие и архивирование данных
Глава 9. Криптография
Глава 10. Параллельные вычисления: процессы, потоки и сопрограммы
Глава 11. Обмен данными по сети
Глава 12. Интернет
Глава 13. Электронная почта
Глава 14. Строительные блоки приложений
Глава 15. Интернационализация и локализация приложений
Глава 16. Инструменты разработки
Глава 17. Инструменты среды времени выполнения
Глава 18. Инструменты языка
Глава 19. Модули и пакеты
Приложение А. Замечания относительно портирования программ
Приложение Б. Внешние ресурсы, дополняющие стандартную библиотеку
Указатель модулей Python
Предметный указатель
Python. Полезные библиотеки
The Python 3 Standard Library by Example
“The genius of Doug’s approach is that with 15 minutes per week, any motivated programmer can learn the Python Standard Library. Doug’s guided tour will help you flip the switch to fully power-up Python’s batteries.”
–Raymond Hettinger, Distinguished Python Core Developer
The Python 3 Standard Library contains hundreds of modules for interacting with the operating system, interpreter, and Internet–all extensively tested and ready to jump-start application development. Now, Python expert Doug Hellmann introduces every major area of the Python 3.x library through concise source code and output examples. Hellmann’s examples fully demonstrate each feature and are designed for easy learning and reuse.
You’ll find practical code for working with text, data structures, algorithms, dates/times, math, the file system, persistence, data exchange, compression, archiving, crypto, processes/threads, networking, Internet capabilities, email, developer and language tools, the runtime, packages, and more. Each section fully covers one module, with links to additional resources, making this book an ideal tutorial and reference.
The Python 3 Standard Library by Example introduces Python 3.x’s new libraries, significant functionality changes, and new layout and naming conventions. Hellmann also provides expert porting guidance for moving code from 2.x Python standard library modules to their Python 3.x equivalents.
- Manipulate text with string, textwrap, re (regular expressions), and difflib
- Use data structures: enum, collections, array, heapq, queue, struct, copy, and more
- Implement algorithms elegantly and concisely with functools, itertools, and contextlib
- Handle dates/times and advanced mathematical tasks
- Archive and data compression
- Understand data exchange and persistence, including json, dbm, and sqlite
- Sign and verify messages cryptographically
- Manage concurrent operations with processes and threads
- Test, debug, compile, profile, language, import, and package tools
- Control interaction at runtime with interpreters or the environment
Pdf python standard library
Ideal for any working Python developer, Fredrik Lundh’s Python Standard Library provides an excellent tour of some of the most important modules in today’s Python 2.0 standard. Mixing sample code and plenty of expert advice, this title will be indispensable for programmers.
The book presents sample script code written by a frequent contributor to Python newsgroups—for almost 200 of the built-in modules in Python 2.0 and shows how to solve common programming problems in Python. Instead of a function-based reference, you get sample scripts for a wide variety of solutions centering on different Python modules.
Early sections look at core modules for working with the operating system, math, and strings, among other functions. Material on Python’s excellent support for files and directories will help you master the file system. Explanations of various encryption schemes will let you add security to your Python scripts.
Getting Python to multitask with multiple threads comes next, along with getting Python programs to communicate using pipes and signals. After the sample scripts for pickling Python objects to and from files, the book delves into modules that are geared toward today’s Internet. First, there’s coverage of Python’s support for XML, HTML, and SGML, followed by a discussion of its extensive networking support for low-level sockets to high-level Internet protocols, including e-mail and FTP. Sample scripts for e-mail will be really useful for any Python programmer.
- N/A
- Amazon
- Python Programming
- Data Structures and Algorithms
- Computational Complexity
- Books by O’Reilly®
- The Python Standard Library (Fredrik Lundh)
- The Python Standard Library by Example (Doug Hellmann) — PDF
- O’Reilly® Think Python, 2nd Edition (Allen B. Downey)
- O’Reilly® Python Cookbook, 3rd Ed: Recipes for Mastering Python 3
- Learning Python (Fabrizio Romano)