>>> def dir2(o, str):
... return [k for k in dir(o) if k.find(str) != -1]
...
>>> v = window.get_active_view()
>>> dir2(v, "selection")
This is very neat - it was stupid of me to browse those long method name lists without some automated help, especially since it was so easy to implement.
No comments:
Post a Comment