I've written a little Python module which ports a tiny fraction of the decompiler packaged in the sourcemod source. I wrote it to extract the `myinfo` struct from compiled plug-ins for a plug-in auto-updater. Maybe you can find it useful as well.
You can find it at
https://github.com/theY4Kman/pysmx. To use it:
Code:
import smx
with open('myplugin.smx', 'rb') as fp:
plugin = smx.SourcePawnPlugin(fp)
print plugin.myinfo
UPDATE (7/19/2012): the abstract machine runs plug-ins that are a tad more complicated. 77/176 opcodes complete. Managed Python stack. Can match actual instructions executed to .asm files (spcomp -a). PySMX's PrintToServer matches SourceMod's (except 'L', 'N', 'T', 't').
UPDATE (7/15/2012): PySMX now includes a very basic abstract machine, and can execute the test plug-in provided with it. The new features can be found in the
racecondition branch.
__________________