[Pyobjc-dev] using objc.inject
Brought to you by:
ronaldoussoren
From: Daniel A. <an...@cc...> - 2009-07-29 16:41:59
|
Re: "does anyone use objc.inject" from a few months ago, I think I would like to. I'm hoping to get at the internals of a program and extract some hard-to-get-at information. However, trying the InjectInterpreter example code doesn't seem to work, so any hints would be appreciated. Doing: sudo python test.py 71755 (where 7155 is the pid of TextEdit) returns without comment, but prints to the system log: TextEdit[71755]: InjectInterpreterPlugin has encountered a fatal error, and will now terminate. TextEdit[71755]: An uncaught exception was raised during execution of the main script:^M^MSystemError: NULL result without error in PyObject_Call^M^MThis may mean that an unexpected error has occurred, or that you do not have all of the dependencies for this bundle. [0x0-0x48d48d].com.apple.TextEdit[71755]: Traceback (most recent call last): [0x0-0x48d48d].com.apple.TextEdit[71755]: File "/tmp/ InjectInterpreter/dist/InjectInterpreterPlugin.plugin/Contents/ Resources/__boot__.py", line 23, in <module> [0x0-0x48d48d].com.apple.TextEdit[71755]: _run('InjectInterpreterPlugin.py') [0x0-0x48d48d].com.apple.TextEdit[71755]: File "/tmp/ InjectInterpreter/dist/InjectInterpreterPlugin.plugin/Contents/ Resources/__boot__.py", line 20, in _run [0x0-0x48d48d].com.apple.TextEdit[71755]: execfile(path, globals(), globals()) [0x0-0x48d48d].com.apple.TextEdit[71755]: File "/tmp/ InjectInterpreter/dist/InjectInterpreterPlugin.plugin/Contents/ Resources/InjectInterpreterPlugin.py", line 187, in <module> [0x0-0x48d48d].com.apple.TextEdit[71755]: class PyInterpreter(NSTextView): [0x0-0x48d48d].com.apple.TextEdit[71755]: SystemError: NULL result without error in PyObject_Call Any hints? Thanks, dan |