[Mailman-Developers] semantic error in mailmanctl ... @Dale

Barry Warsaw barry at python.org
Thu May 15 16:02:06 EDT 2003


On Thu, 2003-05-15 at 10:30, Oliver Egginger wrote:
> > Could you post the chunk of the execl manpage from Mandrake describing
> > execl?
> 
> The execl isn't the problem.
> It works according to the rules.
> 
> > 
> > Just out of curiosity, are either qrunner or python in your path?
> 
> At the moment I am relatively sure, that the python 2.2.2 binary on my Mandrake 9.1 
> system exspects itself on ARGV[0]. 
> If ARGV[0] yields a different value than 'python', 'python2.2', '/usr/bin/python' or
> '/usr/bin/python2.2' the described import errors occurs.
> 
> My python binary expects a executable python binary on ARGV[0] or it don't run
> with imports.
> 
> I don't know why.

Ok, I know what's going on, and it's not Mandrake specific, although the
interaction between the default Python installation on the system, and
your $PATH is probably causing you to see the bug where most people
might not.

I'd forgotten that the Python interpreter uses argv[0] to calculate the
path to its libraries.  I don't have time to tease out all the subtle
interactions between $PATH, argv[0], your Python installations,
--prefix, and --exec-prefix, but see Python's getpath.c mega-comment for
details.

Suffice to say, the full absolute path to Python (i.e. mm_cfg.PYTHON)
should be passed to argv[0] in the os.execl() call for everything to
work correctly.  Alternatively, I could set $PYTHONHOME, but I think
that's a bit more fragile.

I'll commit the fix.
-Barry





More information about the Mailman-Developers mailing list