[Mailman-Developers] Listing Lists Faster in 2.0?

Dan Mick Dan Mick <Dan.Mick@West.Sun.COM>
Mon, 3 Apr 2000 20:09:26 -0700 (PDT)


> >>>>> "DM" == Dan Mick <dan.mick@West.Sun.COM> writes:
> 
>     DM> Python's library-search path has to be set to include
>     DM> /home/mailman/Mailman.  I just discovered that bin/withlist
>     DM> doesn't do this recently; I'm guessing the driver script
>     DM> doesn't do it either.  For your purposes, I would think that
>     DM> augmenting PYTHONPATH in the environment should suffice.
> 
> Right, because driver is only supposed to be run from the C wrapper
> binary, which /does/ set PYTHONPATH.  I didn't expect withlist to be
> run without explicitly invoking python.

But even when withlist is run from Python, PYTHONPATH/sys.path doesn't 
include /home/mailman/Mailman (this is 1.1):

python -i bin/withlist <listname>
Loading list: <listname> (unlocked)
>>> sys.path
['/home/mailman', 'bin', '/usr/local/lib/python1.5/', 
'/usr/local/lib/python1.5/plat-sunos5', '/usr/local/lib/python1.5/lib-tk', 
'/usr/local/lib/python1.5/lib-dynload']

This means that the relatively-obvious "import mm_cfg" doesn't work.
How come?  Things like that *do* seem like the very purpose of
withlist.

> The -r switch could be used
> this way so I think I'll add a #! line at the top.  Note that it does
> not help to add -i in the #! line.
> 
> -Barry