Extending & Embedding Python Using C, James M., 2023

Подробнее о кнопках "Купить"

По кнопкам "Купить бумажную книгу" или "Купить электронную книгу" можно купить в официальных магазинах эту книгу, если она имеется в продаже, или похожую книгу. Результаты поиска формируются при помощи поисковых систем Яндекс и Google на основании названия и авторов книги.

Наш сайт не занимается продажей книг, этим занимаются вышеуказанные магазины. Мы лишь даем пользователям возможность найти эту или похожие книги в этих магазинах.

Список книг, которые предлагают магазины, можно увидеть перейдя на одну из страниц покупки, для этого надо нажать на одну из этих кнопок.

Extending & Embedding Python Using C, James M., 2023.
    
   In this book we look at how to add C code to Python so that it can be called from a Python program. This is usually is referred to as extending Python although you could see it just as correctly as extending C!

Extending & Embedding Python Using C, James M., 2023


A Route Map.
It is always a good idea to know where you are going and so it is with a book. The next two chapters explain how to get started with development under Linux and Windows. Both chapters use VS Code as the IDE, but, while this is recommended as a way of increasing your efficiency, you can use whatever development environment you are familiar with.

It is worth noting at this stage that, while Linux development is based on the well-known GCC compiler, Windows development makes use of the Microsoft C + + compiler as a C compiler. This is unusual as most Windows C programmers opt to install the GCC compilers, even though this isn’t easy and not native Windows. However, Python itself uses the Microsoft C compiler but, while you could build extensions using GCC under Windows, it is simpler to stick with the Microsoft compiler and Chapter 3 explains how.

Contents.
Chapter 1 Extending And Embedding Python.
CPython.
How Much Python Do I Need To Know?.
C - What You Need To Know.
The Structure Of Python.
The Python C API.
Just Enough Simplicity.
A Route Map.
Summary.
Chapter 2 A First C Module Using Linux.
GCC and VS Code.
Hello World.
Building a Python Extension.
Testing the Module.
Getting the Latest Python.
Multimodal Debugging.
Summary.
Chapter 3 A First C Module Using Windows.
VS Code and MSVC.
Hello World.
Building a Python Extension.
Testing the Module.
Multimodal Debugging.
Summary.
Chapter 4 Module Basics.
The API and PyObject.
The Initialization Function.
Initializing the arith Module.
Computing Pi – How Fast?.
Example Module.
Summary.
Chapter 5 Arguments.
Processing Arguments.
Data Formats Numbers.
Data Formats Strings and Bytes.
Raw data.
Py_Buffer.
Encoders.
Sequences.
Summary.
Chapter 6 Returning Python Objects.
Py_BuildValue.
Numbers.
C Strings.
Wide Character Strings.
Tuples, Lists and Dictionaries.
Summary.
Chapter 7 Objects And Attributes.
Object Arguments.
Reference Counting.
Attributes.
Numbers.
String Attributes.
Set Attributes.
Working With Attributes.
Instance Testing - Advanced.
Summary.
Chapter 8 More Complex Objects – Tuples, Lists and Dicts.
Tuples, Lists and Dicts.
Setting Tuple and List Elements.
Setting Dicts.
Getting Elements.
Slices.
In-Place List Operations.
Sequence Protocols.
Manipulating Dicts.
Iterator Protocol.
Iterating Dicts.
Summary.
Chapter 9 Errors, Exceptions And Reference Counting.
Exceptions - The Python View.
Exception Classes.
Python Exceptions In C.
Raising Exceptions.
Handling Exceptions.
Testing Reference Counting.
An Example.
Using sys and gc.
Summary.
Chapter 10 Bytes And Strings.
Bytes and Bytearray.
Python Strings.
Unicode Strings.
Creating Unicode Strings.
Characters.
Manipulating Python Strings.
Search.
Encoding.
UTF and UCS.
Wide Character Support.
Code Pages.
Locale and File System Encoding.
Codecs.
Summary.
Chapter 11 Modules And Attributes.
Working With Modules.
Adding Module Attributes.
Adding Function Attributes.
Functions In Other Modules.
Multi-phase initialization.
Module Storage.
Summary.
Chapter 12 New Types.
Structs As Objects In C.
The PyTypeObject.
A First Custom Type.
Instantiation.
Adding Attributes To The Class.
Instance Attributes.
Instance Methods – new and init.
Descriptors.
Easy Descriptor Attributes.
Get and Set Attributes.
Summary.
Chapter 13 Advanced Types.
Garbage Collection.
Reference Cycles.
Weak References.
Cyclic Garbage Collection.
tp_dealloc and tp_finalize.
Dynamic Types.
Heap Types With GC.
Inheritance.
Subclassing – init and GC.
Object Factories.
Calling Python.
Summary.
Chapter 14 Threads And The GIL.
How Threads Interact With The GIL.
C Functions On A Python Thread.
Non-Python Threads.
Acquiring The GIL.
Callbacks.
Summary.
Chapter 15 Embedding Python.
Simple Embedding.
Embedding Under Windows.
Embedding Under Linux.
Adding A Module.
Python or C?.
Getting Results From Python.
Embedded Debugging.
Implementing An Embedded API.
Summary.



Бесплатно скачать электронную книгу в удобном формате, смотреть и читать:
Скачать книгу Extending & Embedding Python Using C, James M., 2023 - fileskachat.com, быстрое и бесплатное скачивание.

Скачать файл № 1 - pdf
Скачать файл № 2 - epub
Ниже можно купить эту книгу, если она есть в продаже, и похожие книги по лучшей цене со скидкой с доставкой по всей России.Купить книги



Скачать - epub - Яндекс.Диск.

Скачать - pdf - Яндекс.Диск.
Дата публикации:





Теги: :: ::


 


 

Книги, учебники, обучение по разделам




Не нашёл? Найди:





2025-07-17 06:26:53