Is there a good build build module for Python?

I am looking for a nice build assembly module for Python. I found this: PyAsm

But that does not work. I want to execute and generate an assembly executable for simple operations like add, sub, divide and multiply. Something like the Reflection.Emit library in .NET.

I am developing on Linux (Ubuntu 12.10 64bit) and Python2.7.

For example, when I try to compile this simple subcode using PyAsm, it gives me a โ€œcore dumpedโ€ error:

from ctypes import c_int from pyasm import Program from pyasm.instructions import push, mov, ret, pop, sub from pyasm.registers import eax, esp, ebp def test(): prog = Program( push(ebp), mov(ebp, esp), mov(eax, ebp.addr+8), sub(eax, 10), pop(ebp), ret(), ) fun = prog.compile(c_int, [c_int]) assert fun(1234) == 1224 if __name__ == '__main__': test() 
+4
source share
1 answer

Not just an awesome name: https://github.com/Maratyszcza/PeachPy

See how it is used in: http://www.yeppp.info

+3
source

All Articles