I built simple text editor with some accessibility feature for screen reading software. I'm using Python for .NET (pythonnet) to show a form containing a rich text box. When user press tab after a period it pop-ups a context menu with completions for selected element. Ok, it works fine with Python objects, but it doesn't work with .net live objects, there is no solution to this problem. Now, I want build a TreeView object with all names and definitions of module I'm editing.
So, for example I type:
import sys
import os
lst = list()
etc... If I use jedi.names of my source, I can retrieve os, sys and lst. For each name, I want retrieve sub definitions, such as functions for sys and os module, and methods for lst. I can't find a way to do this with jedi:
names = jedi.names(MySource)
names[0].defined_names() # works for sys
names[1].defined_names() # works for os
names[2].defined_names() # doesn't work for lst instance of list().
Any suggestions? I tried to use more and more editors, but accessibility support is very very bad...
MySource
object? – Edlaimport sys
, It's a complete statement. However if it wasfrom sys import
then you would expect some auto complete options. – PresidiumMySource
is just a string holding the source code shown in the first code block. – Figment