[IPython-User] Attribute sorting.
edepagne@lcog...
edepagne@lcog...
Thu Jul 29 15:43:11 CDT 2010
Hi.
I apologize is this question has already been asked, but I could not find any
information about my problem.
When I use TAB to get a complete list of attributes of an object, the way they
are sorted depends on how I called ipython.
If I call ipython -pylab, I get the following:
In[1] : w = {}
In[2] : w.
w.__class__ w.__format__ w.__init__ w.__lt__
w.clear w.fromkeys w.items w.__ne__
w.__cmp__ w.__ge__ w.__iter__ w.__new__
After pressing TAB. The attributes are sorted as if the __ were not there.
On the other hand, if I start ipython with no option, I get:
In [1]: w = {}
In [2]: w.
w.__class__ w.__getattribute__ w.__ne__ w.__subclasshook__
w.__cmp__ w.__getitem__ w.__new__ w.clear
w.__contains__ w.__gt__ w.__reduce__ w.copy
and in this case, the attributes are sorted with the leading __ taken into
account. And it is the way I want it to look like.
Is there a way to modify the way ipython is set up with the -pylab option, so
that the sorting is always done the same way, that is with putting underscores
before any character?
Thanks a lot.
Éric.
More information about the IPython-User
mailing list