can i write a assemly language programs in python

Dave Angel davea at
Fri Jul 10 07:48:49 EDT 2009

Terry Reedy wrote:
> <div class="moz-text-flowed" style="font-family: -moz-fixed">Dave 
> Angel wrote:
>> m.reddy prasad reddy wrote:
>>> can any one tell me how to write assembly language programs in 
>>> python...if
>>> no is there any other way to write the programs in python
>>> Reddi prasad reddy
>> Assembly language is a different programming language than Python.  
>> You can use both in the same process, much in the same way you can 
>> use C or C++ with Python.  In fact, some of the system DLL's are 
>> written (partly) in assembler, though mostly in C or C++.
> It is possible that he meant how to write assembly *with* python.
> Or how to translate python to assembly.
> As it turns out, CPython translates Python to byte code and has a dis 
> (assembly) module that produces very nice assembly code ;-)
> So that is one answer to his question.
>> You'll need to tell us what your real goal is.
> Definitely.
> tjr
> </div>
If you mean dis.dis() that only gives you byte code.  I assumed he was 
referring to native code assembly.

I guess I'd better stop guessing <grin>.


More information about the Python-list mailing list