PyMemoryModule is a Python binding for MemoryModule.
Project description
PyMemoryModule
PyMemoryModule is a Python binding for MemoryModule.
By this module, you can load DLL completely from memory - without storing on the disk first - all thanks to MemoryModule written by Joachim Bauch.
How to install
pip install pymemorymodule
How to use
import ctypes import pymemorymodule as pymm with open("path/to/library.dll", "rb") as fp: # Load DLL from bytes object handle = pymm.MemoryLoadLibrary(fp.read()) # __declspec(dllexport) int add(int a, int b) add = ctypes.cast( pymm.MemoryGetProcAddress(handle, "add"), ctypes.CFUNCTYPE(ctypes.c_int, ctypes.c_int, ctypes.c_int) ) # Use function exported from DLL assert add(1, 2) == 3 # Free loaded DLL pymm.MemoryFreeLibrary(handle)
How to build and test
python setup.py build_ext -i test
How to run code check
python -m pip install flake8 python -m flake8 --show-source setup.py test.py
How to prepare README.rst
python setup.py md2rst
MemoryModule
License
Mozilla Public License Version 2.0 (MPL2.0)
See also license of MemoryModule: https://github.com/fancycode/MemoryModule/blob/master/LICENSE.txt
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pymemorymodule-0.0.7.tar.gz
(13.6 kB
view hashes)
Built Distributions
Close
Hashes for pymemorymodule-0.0.7-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a5c9af99ebeddfc25160cffa190ae3a2f85e4f011d3e357efa2770c207718c34 |
|
MD5 | be8ba351278b347e211fc63d854dd5be |
|
BLAKE2b-256 | e6105b78f8094fb3413a2e99a3dbfa739e38c216d35ec9f991ba28971aa54ccb |
Close
Hashes for pymemorymodule-0.0.7-cp35-cp35m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e6c59c5a37dd844c013578cbe843b90430e7f4da55dbaebe0ee137f1abd537b0 |
|
MD5 | eedfffa65eedc09055742fdb5439b652 |
|
BLAKE2b-256 | d2c23bf4c7523f4acce472ff116d82398c1fbd7093b6edef0208a32f8e283bcc |
Close
Hashes for pymemorymodule-0.0.7-cp34-cp34m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cdb296cf06ab2b557f5307d80cbd312710a69ad65003be7fec0f8b823ce02039 |
|
MD5 | 651d0108190e7862279c0f1994c9bd46 |
|
BLAKE2b-256 | f47d238b9c9cc4d794629f975867f288bdb865628902fa04a28121a182638043 |
Close
Hashes for pymemorymodule-0.0.7-cp34-cp34m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c7f36a02c2163a586a6c598b39becf5ac4bd2cdd61af8a4840f6d202c9f2e791 |
|
MD5 | 89bfa8b6e4d97fc219ed1af5b9ae2d0d |
|
BLAKE2b-256 | 7afefab231ce5c667d90d299ee9edb5bfd6016d4d13cb4f4f64e2a2e42886468 |
Close
Hashes for pymemorymodule-0.0.7-cp33-cp33m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9507cdce5cb518170914b860f8eb3b176f8dfe26f0985f4cd5d54617c4cfc150 |
|
MD5 | 546468cf44de2f0067282ccb4b5e32d3 |
|
BLAKE2b-256 | c0b85a2fe28cc984ba32dbfcff1bcd3044e5198f964744a21420f498596d0537 |
Close
Hashes for pymemorymodule-0.0.7-cp33-cp33m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0266b788dd83534aaa12e53d900d5afa40a137be8c7ca2f33b59da2de8ac7786 |
|
MD5 | 9141ea505ef7564b7cadf62611a7880a |
|
BLAKE2b-256 | 3697cf7afd3e6eaf2bb046db557f16a265dbb4b41f36ca71b5e4bfd2969e8623 |
Close
Hashes for pymemorymodule-0.0.7-cp27-cp27m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b20cf30804267cd32d803d10244e94899ead60265dc5043b17e0cef47cbde31c |
|
MD5 | 62537fce58c9de7a12324eca21969a29 |
|
BLAKE2b-256 | 24a5717ff6b893aaeafb141cc568723c9f27e28821dfab29b6872d496642a237 |
Close
Hashes for pymemorymodule-0.0.7-cp27-cp27m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 75813b0ffacd71488961adb3d0e181a6bf408a533eed78a35f2465c95e97595c |
|
MD5 | 6ee3486f5aa17b02c1a339bc74878185 |
|
BLAKE2b-256 | e852122a01c16032c677cff9d98a546bdca9a92261dbe9995f870ac6ffe6b0ee |
Close
Hashes for pymemorymodule-0.0.7-cp26-cp26m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c9185bb9f0e869784099c0ef78156ce4a34f96fa8192d5a7ba63f1cedee0bf38 |
|
MD5 | cd8367c4a5db42a7ad4233c50ff5301d |
|
BLAKE2b-256 | 1b35ea6e49fc02e48ffd356ea8491720d8f1283cc907bf0bb0a24c1d8485b86b |
Close
Hashes for pymemorymodule-0.0.7-cp26-cp26m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 40e6e5a35a0637f99a173ca4514e55e39f22908cd8dc6b5d1e7b8dacb85846cc |
|
MD5 | 24b4fea0e2cefd08155465e4a9dfd4e4 |
|
BLAKE2b-256 | 4de2e6174a367c35dca706957d1f3c04d4b976800cf48501becac7d6576bcded |