Gentoo Archives: gentoo-user

From: Alan McKinnon <alan.mckinnon@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] bash stopped running python scripts...
Date: Mon, 03 Aug 2009 21:04:44
Message-Id: 200908032303.19327.alan.mckinnon@gmail.com
In Reply to: [gentoo-user] bash stopped running python scripts... by Mike Edenfield
1 On Monday 03 August 2009 22:56:51 Mike Edenfield wrote:
2 > I dunno what I did, but I've managed to break python shell scripts,
3 > which of course is playing havoc with portage. Bash no longer wants to
4 > execute the scripts with python as the interpreter, but insists on
5 > executing them as bash scripts. Python itself is still functioning
6 > properly, when invoked directly. Since I happen to have ImageMagick on
7 > this machine, the result is this:
8 >
9 > kutulu@apollo ~ $ cat test.py
10 > #!/usr/bin/python
11 > import sys
12 > print "Python Ok."
13 > kutulu@apollo ~ $ ./test.py
14 > X connection to localhost:11.0 broken (explicit kill or server shutdown).
15 > ./test.py: line 3: print: command not found
16 > kutulu@apollo ~ $ python ./test.py
17 > Python Ok.
18 > kutulu@apollo ~ $
19 >
20 > Perl and Tcl both still work as expected, and by invoking python
21 > directly I can still get portage to merge things. For example:
22 >
23 > root@apollo ~ $ python -O /usr/lib/portage/bin/ebuild
24 > /usr/portage/dev-lang/python/python-2.6.2-r1.ebuild install
25 >
26 > will re-merge python successfully, which I have now done for both python
27 > and bash, to no effect.
28 >
29 > Any ideas?
30 >
31 > --Mike
32
33 Did you recently merge python-3 and were so foolish as to make it the
34 default?
35
36 What is /usr/bin/python? and what version is it (-V)?
37
38 --
39 alan dot mckinnon at gmail dot com

Replies

Subject Author
Re: [gentoo-user] bash stopped running python scripts... Mike Edenfield <kutulu@××××××.org>