pointers.py
Bringing the hell of pointers to Python
Why would you ever need this
Examples
from pointers import _
text: str = "hello world"
ptr = _&text # creates a new pointer object
ptr <<= "world hello"
print(text) # world hello
from pointers import c_malloc as malloc, c_free as free, strcpy, printf
ptr = malloc(3)
strcpy(ptr, "hi")
printf("%s\n", ptr)
free(ptr)
Features
- Fully type safe
- Pythonic pointer API
- Bindings for the entire C standard library
- Segfaults
Why does this exist?
The main purpose of pointers.py is to simply break the rules of Python, but has some other use cases:
- Can help C/C++ developers get adjusted to Python
- Provides a nice learning environment for programmers learning how pointers work
- Makes it very easy to manipulate memory in Python
- Why not?
Installation
Linux/macOS
python3 -m pip install -U pointers.py
Windows
py -3 -m pip install -U pointers.py
Metadata
Release files for pointers-clone.py 0.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pointers_clone.py-0.0.0.tar.gz | 63.0 kB | Without provenance | Details for pointers_clone.py-0.0.0.tar.gz |
Release files / pointers_clone.py-0.0.0.tar.gz
| Download URL | pointers_clone.py-0.0.0.tar.gz |
|---|---|
| Size | 63.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9f0bc5a2c58905f99c492686fd6317e1f28bd18b22bcdfbbd810f3f731e8f13a
|
|
BLAKE2b-256 checksum How to use checksums |
18e4b68d30e5a5f2a76bae4cbfa73a17f62d7e0c27c2d269133bcbab212655a8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.0
|
Security for pointers-clone.py 0.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.