Aschwin Marsman wrote:
> > Hmm, I think the program currently requires Python 2. I might have an
> > attempt to make it work with Python 1.5 again (later). I'll check to
> > see if it's possible to detect the presence of python2. However, this
> > won't be possible in the scripts that start with
> > "#!/usr/bin/env python". Unless someone knows a trick.
>
> Isn't python 2 always installed at python2, or is this a RH invention?
It isn't on my system (FreeBSD): "python" is a hard link to either
"python1.5" or "python2.2".
I have now changed the test script to use "sys.executable". This means
the same python executable that was used to start the test is used to
execute the individual tests. Please try if it works now.
I also tried using "execfile()", but soon got bitten by side effects
from the test scripts (they don't end up in the directory they started
in). It's better to run each test in a clean python interpreter.
Hopefully the slowdown isn't too much.
The problem of using "python" in the first line of the script remains.
I can't put "python2" there, it would not work on my own system.
And I also can't put an command like "if redhat then..." there. What I
could to is check for running Python 1.5 and then try finding a
"python2" executable. However, restarting with that executable might
have a few side effects.
> > This really requires Python 2. The gettext support wasn't very good in
> > 1.5. I could detect this and skip the gettext support for 1.5 to work
> > around this. Until running into the next problem...
>
> Doesn't sound like a good idea.
I did avoid the trouble with gettext and indeed ran into the next
problem. It seems a local method has another way of handling the local
variables of the function it is defined in. I didn't find an easy way
to solve this, thus it's still not working with Python 1.5.
--
A law to reduce crime states: "It is mandatory for a motorist with criminal
intentions to stop at the city limits and telephone the chief of police as he
is entering the town.
[real standing law in Washington, United States of America]
/// Bram Moolenaar --
Bram@... --
http://www.moolenaar.net \\\
/// Creator of Vim --
http://vim.sf.net --
ftp://ftp.vim.org/pub/vim \\\
\\\ Project leader for A-A-P --
http://www.a-a-p.org ///
\\\ Help me helping AIDS orphans in Uganda -
http://iccf-holland.org ///