Status: Accepted
Owner: asmeurer
Labels: Type-Enhancement Priority-Medium Live

New issue 2589 by asmeurer: Implement tab completion in SymPy Live
http://code.google.com/p/sympy/issues/detail?id=2589

We should make TAB do tab completion at live.sympy.org.

This is actually pretty straight-forward. You just have to use the rlcompleter module (part of the Python 2.5 standard library and included in the App Engine).

The usage is something like

completer = rlcompleter.Completer(globals()) # Or locals(), I'm not sure
completer.global_matches("x")
[xrange, x, xthreaded]
completer.attr_matches("x.is_fi")
[x.is_finite, x.is_finite, x.is_finite, x.is_finite, x.is_finite, x.is_finite, x.is_finite, x.is_finite, x.is_finite]

I don't know why the last one gives duplicate results, but it's easy enough to remove them (list(sorted(set(completions)))).

And I checked: if you add "case SymPy.Keys.TAB:" to sympy-core.js, it works (at least in Safari).

Actually, if I knew Javascript, I would implement this myself.

--
You received this message because you are subscribed to the Google Groups 
"sympy-issues" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sympy-issues?hl=en.

Reply via email to