Assembly Interpreter/Embedding C
Fredrik Lundh
fredrik at pythonware.com
Tue Oct 19 04:03:32 EDT 1999
Jeff Shipman - UC <jeff at nmt.edu> wrote:
> I am building an interactive Intel Assembly interpreter using Python. I
> am now needing to add the part where my binary code is taken, loaded
> into memory and executed. I've heard the only way of doing this is to
> use C (how, I'm not quite sure yet *grin*). I am having trouble making
> up a module in Python. I've looked at the example in the handbooks I've
> found and they don't seem to work for me. Could someone show me a
> working example and tell me what include files, etc I would need for it
> to compile correctly.
1) get the Python sources
2) look at Modules/xxmodule.c
alternatively, you may wish to take a look at
SWIG (www.swig.org) which can create the
Python interface for you!
> If anybody knows of a better way to take binary code and execute it,
> then please feel free to tell me! =)
well, I'd emulate it if I were you. but that's another
story...
</F>
<!-- (the eff-bot guide to) the standard python library:
http://www.pythonware.com/people/fredrik/librarybook.htm
-->
More information about the Python-list
mailing list