[IPython-dev] ip.core.ipapi.get

Robert Kern robert.kern@gmail....
Wed Sep 30 13:02:24 CDT 2009

On 2009-09-30 12:43 PM, Darren Dale wrote:
> My use case is to check in a package's __init__.py to see if it is
> being imported within an ipython session, and if so to load a custom
> completer.


How about making a macro that imports your package into the namespace and sets 
up the completer? Causing side effects on import like this causes more headaches 
than convenience.

If you are adding completers for particular types, you may want to follow the 
approach I took for the HasTraits completer:


Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
  that is made terrible by our own mad attempt to interpret it as though it had
  an underlying truth."
   -- Umberto Eco

More information about the IPython-dev mailing list