Commit 041a1590 authored by Gregory Ashton's avatar Gregory Ashton

Adds tab completion of Result objects in IPython

Closes #111
parent 4d3d51e6
Pipeline #22571 passed with stages
in 10 minutes and 56 seconds
......@@ -70,6 +70,14 @@ class Result(dict):
val = self._standardise_a_string(dictionary[key])
setattr(self, key, val)
def __dir__(self):
""" Adds tab completion in ipython
See: http://ipython.org/ipython-doc/dev/config/integrating.html
"""
return self.keys()
def __getattr__(self, name):
try:
return self[name]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment