Direct memory access

Collin Stocks collinstocks at gmail.com
Tue Mar 6 23:40:06 EST 2007


Does anyone know how to directly handle memory using python?
I want to be able, for example, to copy the actual contents of a memory
address, or set the actual contents of a memory address.
Here is an example of what I would like to be able to do:

>>> num=12
>>> addr=id(num)
>>> contents=<getMemory function>(hex(addr)).read(2)
>>> contents
"0b"
>>> <getMemory function>(hex(addr),"w").write("0e")
>>> num
15

In that example, I was assuming that the function would return a file like
object: it doesn't have to. Any type of function would be fine.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20070306/f5f78681/attachment.html>


More information about the Python-list mailing list