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 pymemorymodule as pymm from ctypes import cast, c_int, CFUNCTYPE 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 = cast( pymm.MemoryGetProcAddress(handle, "add"), CFUNCTYPE(c_int, c_int, 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.
Note: PyMemoryModule also distributes a few lines of MIT licensed codes taken from py3c project.
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.9.tar.gz
(13.7 kB
view hashes)
Built Distributions
Close
Hashes for pymemorymodule-0.0.9-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cd8a96cb8323b8f464bae3e2690870bc9afe6c344910499f3f64aface19c510f |
|
MD5 | e5948b6ee632a2a85c39548f30ebfb83 |
|
BLAKE2b-256 | 024afee627392ede15a2b1793b56a7fd0a424889c258d448964d40dc1a179c7b |
Close
Hashes for pymemorymodule-0.0.9-cp35-cp35m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a6ab5b413128ef40766f4ead4b813fc60d0853ebfa04f6c5a4092ec34e682d12 |
|
MD5 | 5b65acf8693ed3093be008a39073649e |
|
BLAKE2b-256 | 17644b6b3c6440a543d4898f49b3f7c1455acb9634b4ad17762828516dece1ec |
Close
Hashes for pymemorymodule-0.0.9-cp34-cp34m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b98e536e1744341a21f3300048f4446609648b66265fcb74fea7f41b0eb8d2d4 |
|
MD5 | 0933f70b685b3b3b2ec9bd5a41904c9d |
|
BLAKE2b-256 | 340aa6d0c5f6e2ffa36def4a6cc915dbec20fb275359d9383ab4b1f6fb71aac2 |
Close
Hashes for pymemorymodule-0.0.9-cp34-cp34m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | baa9983053cf2786d8d28a9b31b5b0c87a40047ef8a85aca4f120beb061477c4 |
|
MD5 | 363b406457e3f24079c69d35c729ce74 |
|
BLAKE2b-256 | ade7a30307b6498c66a4772a5817e25a5362e728cd76a1da278aa07717a33092 |
Close
Hashes for pymemorymodule-0.0.9-cp33-cp33m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2b1a4e2459614fd3c29d501a421ae0296223413da52126f628da3ba639b1d40a |
|
MD5 | f4dc7194eb1ece8605d24f3b3bfcb117 |
|
BLAKE2b-256 | ac9fdf64050e7f9a9b3b834c5e4c3ba3bc652ef9d9ab631b004675d49955b165 |
Close
Hashes for pymemorymodule-0.0.9-cp33-cp33m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ecf043942ae74f0312cfda44b2a008d36bd1920d67382e7de8e8a3227318d74b |
|
MD5 | dc777f2ba958ef36e5cdc0dd53ec3795 |
|
BLAKE2b-256 | 3063632c6930225bef0c9a8d36f97b377d0a38de828259c6bf1a9ee129871ce6 |
Close
Hashes for pymemorymodule-0.0.9-cp27-cp27m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 881c27a10c56f580a98fbf73fd44eba3c8c4fa74a3e53443bd7c3d5609b7ace2 |
|
MD5 | eb3eae341d6900d0de642690ea698153 |
|
BLAKE2b-256 | c7d9f812756da7a0a451382ad8a467b2b4bfc0330f0dfbce95a3778806a63fd7 |
Close
Hashes for pymemorymodule-0.0.9-cp27-cp27m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c82ebd26f86c38f17d764bc8951eebf9e235b3eb2a49c5fe018c89b3fbf87517 |
|
MD5 | 56c56105a1b2f7252e13df1a4a1cf76f |
|
BLAKE2b-256 | b94bf7af1c8adc175eff3845be78d95f9ea0571a2cd699b11190a210894c827d |
Close
Hashes for pymemorymodule-0.0.9-cp26-cp26m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 91d203cc1aa685515713f62b8ef4af0fb5e022671f74b3df76e4d454372b11d3 |
|
MD5 | 9620277b8c117cf789f07b08ba2b13f5 |
|
BLAKE2b-256 | db569d93a8bf205a65b292f86af27db0e768141cc754d747f9bd52bb702dc4df |
Close
Hashes for pymemorymodule-0.0.9-cp26-cp26m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8a42d472916231510b64705608a0f6f423386460cbef86487f66c3ebfff33177 |
|
MD5 | a85d3b7d2753f87692b296c6a5f4acb4 |
|
BLAKE2b-256 | 1b7b7f54f6222bd5f73f77d12c611b5f1833cc194e6613da7c7df1d91cd23e1e |