[IPython-user] Request for a magic function to hide private function in tab completion
Wong, Shin Guey
Fri May 22 21:47:12 CDT 2009
Thanks for the links. I should read the reference doc before asking this question ☹
For ur question, showing all the private functions is useful for developer. But I have some users who is only use IPython to do some simple stuff, when they hit tab and it shows all the private functions which shouldn’t call by them, this will be really confusing for them if they don’t have good understanding on python program. So, I am thinking to have a magic function that can turn on/off the private function in tab completion. So, a normal user can have a much cleaner tab completion to show all the functions they can call but not all the private function which shouldn’t call by them.<actually we do have another interactive python which has this feature but it is not compatible with IPython because it will crash with IPython tab completion>
From: Gökhan SEVER [mailto:email@example.com]
Sent: Friday, May 22, 2009 10:33 PM
To: Wong, Shin Guey
Subject: Re: [IPython-user] Request for a magic function to hide private function in tab completion
Wouldn't this be destructive to general use of the IPython?
Say we type 5 and a "." (dot) following 5 and hit tab all the helpers are in type of private. Of course this is just a simple example, who needs __mul__() while there is "*". I am sure many base types have only helpers of that type.
There is a section in IPython documentation regarding to defining your own magic functions. (Magic command system)
On Fri, May 22, 2009 at 5:03 AM, Wong, Shin Guey <firstname.lastname@example.org<mailto:email@example.com>> wrote:
Is it possible to add a magic function like %hideprivate so it will hide all private function in python code completion.
All the function name start with _ or __ like <__file__ , _name> will not show when user press <tab> completion.
Or maybe can somebody provide hint on:
1. how to add new magic function
2. how to modify the code completion
IPython-user mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the IPython-user