You can disassemble Python byte code with module dis to something that looks like assembler code, but since there is no Python assembler it's just an analytical tool.
vegaseat
DaniWeb's Hypocrite
5,989 posts since Oct 2004
Reputation Points: 1,345
Solved Threads: 1,417
One way to learn how to produce python byte code without python is to look in python's source code. See how the compile function is implemented in C, and it should give you a clue. Also I suppose that if you want to do the same from java, you should have a look in Jython's source code.
It doesn't solve the main question: is it useful to write python byte code directly instead of writing python code and compiling it ?
Another thing to consider is : what will you do if the syntax or semantics of python byte code changes with the next version of python ?
Gribouillis
Posting Maven
2,786 posts since Jul 2008
Reputation Points: 1,044
Solved Threads: 691