Low level memory management
Chris Liechti
cliechti at gmx.net
Wed May 22 16:58:57 EDT 2002
"Lorenzo Bolognini" <false at email.com> wrote in
news:KLMG8.1134$z87.12314 at twister2.libero.it:
> Hi all,
>
> is there a way to manipulate at a low level memory in Python (as in C)
> ?
first, look at the struct module it is good to convert memory from c or
others to python types and back.
(it works with strings containing the memory, where do you get those from,
is an other question)
> I know that Python wasn't thought to do that but there maybe a Python
> module that acts as a wrapper around some low level functions written
> in C.
what functions do you expect? e.g. string = readFromMemory(address, size)
is dead simple to implement as C extension - the other problem is your OS
that prevents you from reading from arbitrary addresses...
(on linux there is the memory file in /proc where you can dig in the memory
as root - should be simple to use with open and seek file operations)
chris
--
Chris <cliechti at gmx.net>
More information about the Python-list
mailing list