[TxMt] Adding python commands
Andrea Crotti
kerny404 at gmail.com
Mon Dec 29 10:45:27 UTC 2008
I would like to add a couple of things (at least), but I'm afraid I need some
clarifications...
I need a disassembler command, it's just
import dis
dis.dis(module)
or dis.dis(function) or dis.dis(object)
Maybe I need a menu to let it know what I want to disassemble..
I tried something like this:
MOD_NAME=${TM_FILENAME%.py}
cd $TM_CURRENT_DIR && python -c "import dis; import os;
os.chdir(os.environ['TM_CURRENT_DIR']); print "Now in", os.getcwd(); import
$MOD_NAME; dis.dis($MOD_NAME)"; cd -
But it doesn't change dir at all, what am I missing?
Another nice command would be
execute line/selection as python, should I use eval?
I found that tm_helpers give me some nice functions, other sources of
"helpers"?
Last command is pylint "integration", this is alreadly not too bad
pylint $TM_FILEPATH 2>/dev/null | tail -n 2
It just gives me the score of my source code, but a better rappresentation
in html format could be better...
Thanks a lot
--
View this message in context: http://www.nabble.com/Adding-python-commands-tp21201499p21201499.html
Sent from the textmate users mailing list archive at Nabble.com.
More information about the textmate
mailing list