You can embed assembly directly inside your Python program:
- https://github.com/Maratyszcza/PeachPy
- https://github.com//pycca/pycca
- http://codeflow.org/entries/2009/jul/31/pyasm-python-x86-assembler/
- https://github.com/AmihaiN/pyAsm
These work by compiling the assembly and loading it into executable memory at runtime. The first three projects implement x86-64 or x86 assemblers in Python, whereas the last calls out to an external compiler.