From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1MY5Pp-0006Qj-PC for garchives@archives.gentoo.org; Mon, 03 Aug 2009 21:49:58 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 23DEBE03AB; Mon, 3 Aug 2009 21:49:56 +0000 (UTC) Received: from mail-ew0-f210.google.com (mail-ew0-f210.google.com [209.85.219.210]) by pigeon.gentoo.org (Postfix) with ESMTP id DDA48E03AB for ; Mon, 3 Aug 2009 21:49:55 +0000 (UTC) Received: by ewy6 with SMTP id 6so139834ewy.34 for ; Mon, 03 Aug 2009 14:49:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:subject:date :user-agent:cc:references:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:message-id; bh=oddXmU8KQkmOWj5ORsvAdpKvaW3PuqpaC9p6nvtru3w=; b=FgrXFpURUB9wq+malxZtCqqnAw2xQ1KHe1SG1XEgRXeUfg73P3LMKPs/nVKy7y3/zV /Bt/8v5IVYpVLw7vKVhSPJHeYD8qDHcnP7DoJS4EdE7VAAXuR7B+rKFbycZFu5NdkTA+ OWVWKDfkq6SVPu6Z4jrTjuif5fO7nHRcwDnAk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:date:user-agent:cc:references:in-reply-to :mime-version:content-type:content-transfer-encoding :content-disposition:message-id; b=hvKKniq4bP/qcHNf7tTO4xZYjGGEig2HJNvbsG6Fo36eWaGuu6tDIooC/mkaQQgXro A8unLvI353idSIEUiEMdTSkkUtckJhIkBy0AJZv/mosLV978rpG9a2rWdTrCjY0R9mVI NjCO5yny9wksdM6hZ/SlzchEs5WHWQ9Pyj7yw= Received: by 10.210.59.5 with SMTP id h5mr1857642eba.48.1249336195283; Mon, 03 Aug 2009 14:49:55 -0700 (PDT) Received: from nazgul.localnet ([196.210.202.145]) by mx.google.com with ESMTPS id 28sm931428eye.14.2009.08.03.14.49.52 (version=SSLv3 cipher=RC4-MD5); Mon, 03 Aug 2009 14:49:54 -0700 (PDT) From: Alan McKinnon To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] bash stopped running python scripts... Date: Mon, 3 Aug 2009 23:48:05 +0200 User-Agent: KMail/1.11.4 (Linux/2.6.30-gentoo-r4; KDE/4.2.4; x86_64; ; ) Cc: Mike Edenfield References: <4A774F13.1060307@kutulu.org> <200908032303.19327.alan.mckinnon@gmail.com> <4A775500.8040803@kutulu.org> In-Reply-To: <4A775500.8040803@kutulu.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200908032348.05377.alan.mckinnon@gmail.com> X-Archives-Salt: fa7174b3-20cd-49f2-8d5b-3d12e69b77bc X-Archives-Hash: 2017b09e0587ec32a12c938b3c8d8313 On Monday 03 August 2009 23:22:08 Mike Edenfield wrote: > On 8/3/2009 5:03 PM, Alan McKinnon wrote: > > On Monday 03 August 2009 22:56:51 Mike Edenfield wrote: > >> kutulu@apollo ~ $ cat test.py > >> #!/usr/bin/python > >> import sys > >> print "Python Ok." > >> kutulu@apollo ~ $ ./test.py > >> X connection to localhost:11.0 broken (explicit kill or server > >> shutdown). ./test.py: line 3: print: command not found > >> kutulu@apollo ~ $ python ./test.py > >> Python Ok. > >> kutulu@apollo ~ $ > > > > Did you recently merge python-3 and were so foolish as to make it the > > default? > > I did emerge python-3, but then unmerged it almost immediately, and it > was never the default. Python was already broken when I merged python > 3.1, which I did to see if it fixed anything, which of course it didn't. > > > What is /usr/bin/python? and what version is it (-V)? > > root@apollo ~ # /usr/bin/python -V > Python 2.6.2 > root@apollo ~ # cat /usr/bin/python > #!/bin/bash > # Gentoo Python wrapper script > > [[ "${EPYTHON}" =~ (/|^python$) ]] && EPYTHON="python2.6" > "${0%/*}/${EPYTHON:-python2.6}" "$@" > > Is that supposed to be that way? I vaguely recall from my Tcl days that > tclsh used to cause problems with the #! lines when it was a shell > script, and that you had to use some odd exec trick to get tcl shell > scripts to run. Is that still true? I have the identical file, it works here. > Looking back through my emerge.log it appears that the last thing to > successfully run through emerge was eselect-python, if that makes a > difference. Your original post has a "X connection to localhost:11.0 broken" error, which is mighty unusual. The error is common enough, but has nothing to do with python. Try some brief out-of-the-box tests: 1. Does test.py run OK from a virtual console? 2. Have you logged out and back in to X since merging python? 3. Have you re-merged python-2.6 just in case your sys lib is damaged? -- alan dot mckinnon at gmail dot com