REPOST: Re: Can't exit python with ^D under certain circumstances

Kaden sfam at
Fri Dec 28 12:40:25 EST 2001

On Fri, 28 Dec 2001 11:33:43 -0500, Steve Holden <sholden at>

> "wealthychef" <wealthychef at> wrote in message
> news:mailman.1009322789.23019.python-list at

>> Hi, this is weird to me, don't know how to fix.
>> On my local python installation on machine A in a normal shell, ^
>> D works to exit Python as expected.  On machine B on the
>> console, ^D also works fine, but if I ssh to machine B from
>> machine A and try to exit Python with ^D, Python does not exit,
>> instead I get the following strange error message:
>> >>> ^D
>>   File "<stdin>", line 1
>>     c
>>     ^
>> SyntaxError: invalid syntax

Have you checked your TERM envariable?  Try checking what it's set to
while at the local console.  Then ssh into the remote machine and check
what that one is set to.  I've got a machine here at home that sets my
TERM to dumb if I ssh into it for some reason.  You can imagine the kinds
of problems that causes :)

If this is the problem, just explicitly set it in your ~/.profile ||
~/.bashrc || ~/.cshrc || whatever.  Should clear it up.

========= WAS CANCELLED BY =======:
From: Kaden <sfam at>
Newsgroups: comp.lang.python
Subject: cmsg cancel <a0iaq9$1ga$1 at>
Control: cancel <a0iaq9$1ga$1 at>
Date: Mon, 31 Dec 2001 05:16:24 GMT
Organization: A poorly-installed InterNetNews site
Lines: 2
Message-ID: <cancel.a0iaq9$1ga$1 at>
X-Trace: 1009775193 27193 (31 Dec 2001 05:06:33 GMT)
X-Complaints-To: usenet at
NNTP-Posting-Date: Mon, 31 Dec 2001 05:06:33 +0000 (UTC)
X-No-Archive: yes
X-Unac4ncel: yes
X-Commentary: I love NewsAgent 1.10 and the Sandblaster Cancel Engine Build 74 (19 March 1999)

This message was cancelled from within Mozilla.

More information about the Python-list mailing list