Bringing the hell of pointers to Python.
Project description
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
Project details
Release history Release notifications | RSS feed
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
Close
Hashes for pointers.py-2.4.0-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e6db743c81bc8a608b9a91d0a4330933df0ed00819d99842f60ff9f14a40f706 |
|
MD5 | b308ef48da6c8673b1430113779b566c |
|
BLAKE2b-256 | 82d0d3e66b39b179b461bdad96c9050d4f3c858a4904fffe628285729e133a27 |
Close
Hashes for pointers.py-2.4.0-cp310-cp310-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0a155d3bde1ea6c6f6347e36e573cad393ed91c8480a6870d26824b810a81072 |
|
MD5 | ca20b82df93617b9c11750216da0c037 |
|
BLAKE2b-256 | 58ace7525f0deccfe4495eaa961e90a14492f6b6faf22fa65b455f43ecfa7447 |
Close
Hashes for pointers.py-2.4.0-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8e8ee1c12147c36e422c26d4cda1175c4858f29502b5f38df90c59f4c0652e5a |
|
MD5 | cf5ab21387f0ab936557dad52668f47f |
|
BLAKE2b-256 | ec57e06576c0d62edaae5fa55250e0ebc9e478388f16b97db4b91202d4e6d482 |
Close
Hashes for pointers.py-2.4.0-cp310-cp310-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c1775c1f8c0bd60fc7eee92c388841fc3962ca14ce46c8a71d329a62ac8cc54c |
|
MD5 | 991b6e3d0a1c5c25413bbdc1da896c80 |
|
BLAKE2b-256 | 61eaad102213ccde403223bbd5248364aae504f13937737aa5bfbecc30d1199c |
Close
Hashes for pointers.py-2.4.0-cp310-cp310-musllinux_1_1_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f6cec7a115a4b50d1095586b66263378d9343e7a0e6b16fdf90e96c1bcb8bef9 |
|
MD5 | 6c137877825e2da4625f1d1102874d8c |
|
BLAKE2b-256 | 2e40577da5ce07ec35c76d5bbe0d118f41df8124d9357c73bdb378c1a300667f |
Close
Hashes for pointers.py-2.4.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | af4f6c5944eb3777cb127b0f58d51d030c067643a7cccb60b7e9ed3dfcdb3e1e |
|
MD5 | 77f03926040a1722b0aabe690d9f9395 |
|
BLAKE2b-256 | 9573cc3ff7578ce0e4e32ccd714a346993e757bcc364bbd4dde58283769a41f7 |
Close
Hashes for pointers.py-2.4.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c197257e835369c845f458d44fa767363078bc0492530d40b214f143fbca7708 |
|
MD5 | f7d842d382ef40d0d319cda6518846bc |
|
BLAKE2b-256 | e2ffed911541e7d298a3c88c3b20e9df32c867259a76d33ab5a77267f795393a |
Close
Hashes for pointers.py-2.4.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f107d55fa5d7c83c943b36a8f5d4cbae792fe14e7d0b10a088cdc2118327149a |
|
MD5 | 63bc457191b8881e3f3f9046c7ea227b |
|
BLAKE2b-256 | 05be896c2f091a47e9cfb23a0df0a733f4a6db2f23f9d8e88b1ea161f20d6fa0 |
Close
Hashes for pointers.py-2.4.0-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 04f292bcd8c929c73399da603b0e8aff5a3e103936f2f7a781263515f20ab831 |
|
MD5 | c794cce37f61515aa2e0bc7841e706f5 |
|
BLAKE2b-256 | 5efb829400f954f33131d4fa967f66d03983672ddb9c0f2b2513bff4b8caa343 |
Close
Hashes for pointers.py-2.4.0-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a158944de9635014b4beaa6ac9bbcb92ae2089387696dd9de15062c09e45b3e2 |
|
MD5 | e036794630891c954289b19c72f25776 |
|
BLAKE2b-256 | 09980fb8df69813d57e2400f5954a147dbbaa6072d35d10afe4660b3c15a9da3 |
Close
Hashes for pointers.py-2.4.0-cp37-cp37m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5f6257ea8f931e2931990bfc390d550dfe5dd42bbbdee9f432ac9e6396209e2e |
|
MD5 | 66fceda384317bf61e8254785f64ca1f |
|
BLAKE2b-256 | 5116a77c0129b4ccd5b6998da8a812b58d2e3142f057c95f294fc8ccd58cae2e |
Close
Hashes for pointers.py-2.4.0-cp37-cp37m-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cc5fc8034f1c0c0fba6efd6aa0be46ba8d83cf7a45924c9484b4105d5c53615a |
|
MD5 | 93ce5315f141c42e181cacc68b98f6e8 |
|
BLAKE2b-256 | 55569915bc5a21974024170054d678a17a3390ef0be12d540b5557186ce19a9f |
Close
Hashes for pointers.py-2.4.0-cp37-cp37m-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e905ec39bf2478aed28016ae9aa3ef677768f0e07a33b9c5378b47336b7ac843 |
|
MD5 | 09b97a0391d32bcc5198116e3da2730c |
|
BLAKE2b-256 | 4cae4b10122f28a38d873a5685fef3af4d91fc43ccd086cf09dd059e66dd096a |
Close
Hashes for pointers.py-2.4.0-cp37-cp37m-musllinux_1_1_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f89c1669549c5004821c24d847e42919d64ea1f0e529037863370c4dcd56b28c |
|
MD5 | 4c6904859040a0b75ee4d68c66492e64 |
|
BLAKE2b-256 | 8c31011b7bf8c18499377f842986f1b97fa7208eab71a22c2e604b95b61ce3bf |
Close
Hashes for pointers.py-2.4.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 638017c58c29fb4c6df9f43bf10f31893d3654ac1e6211ceafc9054940525d64 |
|
MD5 | 178440d990ab54938755cc28b541e670 |
|
BLAKE2b-256 | b11f1481c6b744b62ad5ffa19af7c0ede31f689d8c4a44f9da9bc587639e0c82 |
Close
Hashes for pointers.py-2.4.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5680a584e9fddbbccbe828c8ffc0e3800481da15bbdf5ad0c0b573bdc59126c2 |
|
MD5 | 24034f74f2d38a36f86dcea9888c797a |
|
BLAKE2b-256 | 94ebdebb8ae7a330bd787d097f4b40a055748030a54c7626ccb0af74068bcf0b |
Close
Hashes for pointers.py-2.4.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9626f4bb0fa9343bd4c9fa0a3f5914f6d271440110eb43b5f8e29fed0491fa5f |
|
MD5 | 25962873cfa17b2ccb95600f10150642 |
|
BLAKE2b-256 | b58ab7b78fa8444dfd7fc7326e69dfc89f883500024420afa3aea756644225a7 |
Close
Hashes for pointers.py-2.4.0-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b01b825a31c66cffb560d562e10b30fb4a90768d269cf260977c9289b6bf3900 |
|
MD5 | 2fe7dcdd9ae0170f58d7efa06d3bd903 |
|
BLAKE2b-256 | 07b60392a84e69ce51796255d887b4a92a9b36609155c7d255af8fa4ff26a1de |
Close
Hashes for pointers.py-2.4.0-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7ec01e03c6ce9fa2894625ae7b8bbdd77584d7b5f0ad6af8c1c88ab3da72e290 |
|
MD5 | dc33475bc8000199903a7a451e539274 |
|
BLAKE2b-256 | 4e8eeb4c714aa41bdc098f26bb4fa5e2997dd8c50a17a144d7eb69e654dd9412 |
Close
Hashes for pointers.py-2.4.0-cp36-cp36m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cda2db9c37255a1acfddb538815c60c2796e47a7f8598c9c4fc98a167675bcd4 |
|
MD5 | c5ca122a0805f060d71c53591440a3bb |
|
BLAKE2b-256 | 10f66c86f5996ad9960f57a0882972afcae2fb9483974bbf7d0edc6ba6b267d3 |
Close
Hashes for pointers.py-2.4.0-cp36-cp36m-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 344907583dafb09878fdb3a9b38818a217f9a1bbc5bd327b7b475412c673bf82 |
|
MD5 | 1d5e94f641136ae94a96b7f535e7d4ea |
|
BLAKE2b-256 | 50eca0fe1d430e4489ef132342ff9463bef7419351482d99f4714e171424cd6e |
Close
Hashes for pointers.py-2.4.0-cp36-cp36m-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1205f00e952a5e49c0e8cfa8d3af724c5675b1f26a24478cca9c845fee8782f5 |
|
MD5 | 8d2638764b38500654bf54d4f1286dc6 |
|
BLAKE2b-256 | 5adf86e570e9a16df82695ae80c7114fca5ad42f26e2728dbe99b29f907fa3dd |
Close
Hashes for pointers.py-2.4.0-cp36-cp36m-musllinux_1_1_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8656b9d59305d600db5a9611db4701fef3db11bfe932853de097e1d92a11a9ba |
|
MD5 | 095e785c2bb6f866c844bdd28d0dfd36 |
|
BLAKE2b-256 | 8b51528f4fb5a7c7c31bb33400311e954944d53ebcefa6462e4843cb4ae136eb |
Close
Hashes for pointers.py-2.4.0-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3b741f143610fb7a6af1f5db975073974901b4e8df2d18f78bc2e72d8c6d5b04 |
|
MD5 | 854edd1f8906a8f639731eb1e5590d30 |
|
BLAKE2b-256 | 6631e0460c7c3ef7d24fa9944033777cce958734de1c85eed3736a4df2d0b155 |
Close
Hashes for pointers.py-2.4.0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 26a6df8ba843fd3907c3a527710320f50427eb4f55fa96addb7c01d02db99cb0 |
|
MD5 | 1c2b8f754650335cece3eda923dcbde2 |
|
BLAKE2b-256 | 561938bd5259b12189a4512b33a7267c4eeca229e81f7cdbe92b73bcceb05bbd |
Close
Hashes for pointers.py-2.4.0-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5bde83c2f10b1d44b41d0eae88a343d2f1bc2d276e7e5c43c4b5a3d3a63fc834 |
|
MD5 | aa205053a398b3adc9f910c57e83bbb3 |
|
BLAKE2b-256 | d4d17f0aee75159860a716e97279bb3580cebb5edc15bf38f1b9ff04d16daad8 |
Close
Hashes for pointers.py-2.4.0-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 519fea9273506400297ce146e60a4c9e61a6ee8e76a7ab774fed82c129184979 |
|
MD5 | 8f23d28f3a8035c2bc295d845476d4db |
|
BLAKE2b-256 | bccdedfa966501949129814211bd0b797c3a548a913861fc74e408c0bcf6fb00 |