[IPython-dev] IPython.Extensions on sys.path
walter at livinglogic.de
Fri Nov 3 04:42:51 CST 2006
Fernando Perez wrote:
> On 11/2/06, Ville M. Vainio <vivainio at gmail.com> wrote:
>> On 11/2/06, Walter Dörwald <walter at livinglogic.de> wrote:
>> > I'd like to use Philip Eby's simplegeneric module
>> > (http://cheeseshop.python.org/pypi/simplegeneric) for ipipe. xrepr(),
>> > xiter() and xattrs() could benefit from being generic functions. I
>> > already experimented in this direction some time ago, but now that a
>> > simple standalone generic function module is available it no longer
>> > makes sense to reinvent the wheel.
>> > Philip's OK with us bundling the module, as long as it doesn't conflict
>> > with any installed version of simplegeneric, which it would (but only
>> > when running inside IPython).
>> Ok. Put it into IPython folder (not IPython/Extensions) and import it
>> explicitly from there ("from IPython import simplegeneric").
> I'd suggest making a subdir in IPython for third-party modules, so
> that we can import them from there. It doesn't particularly hurt us
> to have to type an extra word in the import statements, and it is more
> self-documenting that these are simply pulled in for convenience.
> Something like IPython/contrib or 'external' can work.
> from IPython.external import simplegeneric
> lets us clearly know in the future that this comes from the outside.
> We can simply document to users which external modules we ship as a
> convenience, so they can use them from within ipython.
OK, then I'll add it to a new external subpackage.
More information about the IPython-dev