Skip to main content

Bringing the hell of pointers to Python.

Project description

pointers.py

Tests

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

pointers.py-2.1.0-cp310-cp310-win_amd64.whl (31.0 kB view details)

Uploaded CPython 3.10Windows x86-64

pointers.py-2.1.0-cp310-cp310-win32.whl (30.6 kB view details)

Uploaded CPython 3.10Windows x86

pointers.py-2.1.0-cp310-cp310-musllinux_1_1_x86_64.whl (39.1 kB view details)

Uploaded CPython 3.10musllinux: musl 1.1+ x86-64

pointers.py-2.1.0-cp310-cp310-musllinux_1_1_i686.whl (39.0 kB view details)

Uploaded CPython 3.10musllinux: musl 1.1+ i686

pointers.py-2.1.0-cp310-cp310-musllinux_1_1_aarch64.whl (39.3 kB view details)

Uploaded CPython 3.10musllinux: musl 1.1+ ARM64

pointers.py-2.1.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (35.0 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ ARM64

pointers.py-2.1.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (34.4 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64manylinux: glibc 2.5+ x86-64

pointers.py-2.1.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl (34.1 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ i686manylinux: glibc 2.5+ i686

pointers.py-2.1.0-cp310-cp310-macosx_10_9_x86_64.whl (27.6 kB view details)

Uploaded CPython 3.10macOS 10.9+ x86-64

pointers.py-2.1.0-cp37-cp37m-win_amd64.whl (31.0 kB view details)

Uploaded CPython 3.7mWindows x86-64

pointers.py-2.1.0-cp37-cp37m-win32.whl (30.6 kB view details)

Uploaded CPython 3.7mWindows x86

pointers.py-2.1.0-cp37-cp37m-musllinux_1_1_x86_64.whl (39.8 kB view details)

Uploaded CPython 3.7mmusllinux: musl 1.1+ x86-64

pointers.py-2.1.0-cp37-cp37m-musllinux_1_1_i686.whl (39.7 kB view details)

Uploaded CPython 3.7mmusllinux: musl 1.1+ i686

pointers.py-2.1.0-cp37-cp37m-musllinux_1_1_aarch64.whl (39.9 kB view details)

Uploaded CPython 3.7mmusllinux: musl 1.1+ ARM64

pointers.py-2.1.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (35.0 kB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.17+ ARM64

pointers.py-2.1.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (34.4 kB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.17+ x86-64manylinux: glibc 2.5+ x86-64

pointers.py-2.1.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl (34.2 kB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.17+ i686manylinux: glibc 2.5+ i686

pointers.py-2.1.0-cp37-cp37m-macosx_10_9_x86_64.whl (27.5 kB view details)

Uploaded CPython 3.7mmacOS 10.9+ x86-64

File details

Details for the file pointers.py-2.1.0-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for pointers.py-2.1.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 dd19ffecb0256162e3c8d7258321cbb47f61a4a317cc0eb4facefc3696956d88
MD5 c712916255d0b2900807078d3f60dd4f
BLAKE2b-256 8b0f3c58819527d1840b2af6cccef5a0c9b0f431919f4932ceb7e985c60a4c13

See more details on using hashes here.

File details

Details for the file pointers.py-2.1.0-cp310-cp310-win32.whl.

File metadata

  • Download URL: pointers.py-2.1.0-cp310-cp310-win32.whl
  • Upload date:
  • Size: 30.6 kB
  • Tags: CPython 3.10, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.14

File hashes

Hashes for pointers.py-2.1.0-cp310-cp310-win32.whl
Algorithm Hash digest
SHA256 28a7e22487f4c0d2c7829de553307f25b75299507019765e8d68120abdd4812d
MD5 5dff891f91a55043f115d5772af4e30d
BLAKE2b-256 20f863b3b9b2d3fef89782ddce0ada13429920b3eaf68a64e77f37c13e7a3410

See more details on using hashes here.

File details

Details for the file pointers.py-2.1.0-cp310-cp310-musllinux_1_1_x86_64.whl.

File metadata

File hashes

Hashes for pointers.py-2.1.0-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 3277af4722fe31f158cd9cd9e6215baab0704de629eeb5f45cb812271d12563a
MD5 a73e6139a68c95c24171b77d6030a8c1
BLAKE2b-256 7fa4c306497f459dff60da725035590d7e686dbc4c7323c72855f2743f468516

See more details on using hashes here.

File details

Details for the file pointers.py-2.1.0-cp310-cp310-musllinux_1_1_i686.whl.

File metadata

File hashes

Hashes for pointers.py-2.1.0-cp310-cp310-musllinux_1_1_i686.whl
Algorithm Hash digest
SHA256 e63c6f44f056b99c0e40804b9a7797364cd25787f0580766a2a4cb89b76070f3
MD5 22ba4b1c5da9913efdb620a192ec0e9e
BLAKE2b-256 37fcaabf1aefe4fdce7cb4d945aa6468713c72b40eef3388488139e2a3d8de65

See more details on using hashes here.

File details

Details for the file pointers.py-2.1.0-cp310-cp310-musllinux_1_1_aarch64.whl.

File metadata

File hashes

Hashes for pointers.py-2.1.0-cp310-cp310-musllinux_1_1_aarch64.whl
Algorithm Hash digest
SHA256 37a0e280ebb9ae5cb9a42e054f9e819cca5a850b8c88ddbcb0b120e23e8d8693
MD5 a484686e1a76ae0a2f81251f4fee3d51
BLAKE2b-256 fec8169bc7950e8b95f43438923274721fe4499a95a70bced2de1f6e4082af5b

See more details on using hashes here.

File details

Details for the file pointers.py-2.1.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for pointers.py-2.1.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 e3d8d6eb758ed33abdf730225f6852871a09fe265c9561309969ba3801f0fd5f
MD5 fe98fb9698a99e1fe68773d6eee4d175
BLAKE2b-256 d56a380d9fd6c043c252f478d7974cac6d2eb38c6fe20e289deb5c459f68b854

See more details on using hashes here.

File details

Details for the file pointers.py-2.1.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pointers.py-2.1.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 28368935d58fe83a1b5c528fc63f05fbba880f277ce24bbd8dfa76e060b22704
MD5 e95358499a34c0c532ad3675946a3a72
BLAKE2b-256 a003941f869dc1abe047eec9783e4aff302b3ab9cd42769e2bddf13a576cf4f1

See more details on using hashes here.

File details

Details for the file pointers.py-2.1.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for pointers.py-2.1.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 be565e4a0a1122d5ee7af9ad70f4ef445842bcb3f861115aa782b75b0141c94b
MD5 532b7d82fca980cf358c645a3e97d02a
BLAKE2b-256 da6f038d4fb6c61c87eca0910360af2bbabfb27d4aed38cd50777a5bc9c56a97

See more details on using hashes here.

File details

Details for the file pointers.py-2.1.0-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for pointers.py-2.1.0-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 8ef37a45e1ea962afcea2b4066de1ff509b97ac19bb0d9c8198f01c46bf137ad
MD5 474d23757a20d56cf54ce182ef3c9501
BLAKE2b-256 ed659d0d617eedc06aa042f39c4ca92fb52cfa8e6a3732d90d374de18b94cda1

See more details on using hashes here.

File details

Details for the file pointers.py-2.1.0-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: pointers.py-2.1.0-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 31.0 kB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.14

File hashes

Hashes for pointers.py-2.1.0-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 87ec86aab20263c3a724c355674b3ca9e5a96e46436daae3e700677ff71f5ee3
MD5 1e7e7b98e0756441cf2f4b02000e6e11
BLAKE2b-256 00f7e11061c4b8043c54833bc9f4ec52751e58cb741453ac95778db3c3612890

See more details on using hashes here.

File details

Details for the file pointers.py-2.1.0-cp37-cp37m-win32.whl.

File metadata

  • Download URL: pointers.py-2.1.0-cp37-cp37m-win32.whl
  • Upload date:
  • Size: 30.6 kB
  • Tags: CPython 3.7m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.14

File hashes

Hashes for pointers.py-2.1.0-cp37-cp37m-win32.whl
Algorithm Hash digest
SHA256 2e5826d9a3791dc9ca9f48acc0a7727d3b8cabc9b029a256a51c08b315fda2c0
MD5 0fea1e628f50a797543149ca96d5f621
BLAKE2b-256 6e304bde66042d917a0af9a5d8bde6533fe87e6ce3f44c31ebe0ef6e42cd33a4

See more details on using hashes here.

File details

Details for the file pointers.py-2.1.0-cp37-cp37m-musllinux_1_1_x86_64.whl.

File metadata

File hashes

Hashes for pointers.py-2.1.0-cp37-cp37m-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 27af8e238f13ee4919fee402be541769623a34e4aec941669fab86c61e8d040b
MD5 acc0af3981597a8f0529dba7cf44d55a
BLAKE2b-256 9911c1e81fda312a5d708ff5b5a6bbd258de7aaf62c3fbf6e95b9043276b000a

See more details on using hashes here.

File details

Details for the file pointers.py-2.1.0-cp37-cp37m-musllinux_1_1_i686.whl.

File metadata

File hashes

Hashes for pointers.py-2.1.0-cp37-cp37m-musllinux_1_1_i686.whl
Algorithm Hash digest
SHA256 1724a4303b124beb448d142b0d6570efc1455accaff9e71b555b409bf78fc52b
MD5 4c4766114aeac736bd53b25a7740ea3f
BLAKE2b-256 688581b5d85d91f3afe762eb4324f12bbe6688cfecb387cf38795eb4cad99d3c

See more details on using hashes here.

File details

Details for the file pointers.py-2.1.0-cp37-cp37m-musllinux_1_1_aarch64.whl.

File metadata

File hashes

Hashes for pointers.py-2.1.0-cp37-cp37m-musllinux_1_1_aarch64.whl
Algorithm Hash digest
SHA256 107fbaa0a72f78dc3b8e3639b37866e4ffee831fc95b50fa40818d1f62f756df
MD5 cad215041e9b2e284eda33ac79b823f2
BLAKE2b-256 e97c24e8e1805b5de716cf3e8e5ada815eac8f0939d5d3107f45db8fc10a64ae

See more details on using hashes here.

File details

Details for the file pointers.py-2.1.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for pointers.py-2.1.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 a2a44c62981875f2f22025abdee48e9ce69d10afbf17d9a31e290da37b1f7e71
MD5 13835e96339a46e2dc7155915dfbf421
BLAKE2b-256 68ebc78bf41362201642096c96b1f5b5c4ff073f8dbb565241afe9a71e792f99

See more details on using hashes here.

File details

Details for the file pointers.py-2.1.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pointers.py-2.1.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 73dc3ec98cda1c73d5249838d5095680f00b39fd8e1375d6ebb96f0298cf6338
MD5 54fb9e4c24f9b174fb1f19660999e8ed
BLAKE2b-256 9315fd2ac29177262755f670e82cb91ba62fe5db7ecd2ea8a46de51f95c8f176

See more details on using hashes here.

File details

Details for the file pointers.py-2.1.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for pointers.py-2.1.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 d872651c8a04a748cb6ec21ff6697e05839308cdec58319d43e5443fa5f43c52
MD5 ff347e725ed575dd59c09621e256e1f6
BLAKE2b-256 ca8bd55164712eae9793abc7550af06f890f6ffeb15f91ba71d697e5846eb9bf

See more details on using hashes here.

File details

Details for the file pointers.py-2.1.0-cp37-cp37m-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for pointers.py-2.1.0-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 5e555cd2be1f9bf445a5b863461fc76adce5e617a22664025f7b7fa7d48b7a21
MD5 764163487f6b10f5041096ee330f765b
BLAKE2b-256 f7fdd5c5a14e8cc63ab4d7b1bf60539581b69aa7473d6e7190f38f1bd423facc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page