From inside a plugin:
- Code: Select all
import inspect
inspect.getargspec(self.deviceStartComm)
>ArgSpec(args=['self', 'dev'], varargs=None, keywords=None, defaults=None)
It also works in a scripting shell because it is also a plugin (a special one). So in the scripting shell you can see all the methods defined in the Plugin base class. If you do a
Reload in Interactive Shell on any plugin, you can inspect any methods defined in that plugin (as well as those in the Plugin base class).
Combine that with:
- Code: Select all
dir(self)
to show all methods (beware, it also shows properties which dir won't work on) you can pretty much find and inspect anything about an object.