On Mon, Jun 09, 2008 at 11:33:21AM +0200, H.Merijn Brand wrote: > On Mon, 09 Jun 2008 10:03:15 +0100, Patrick Quinn-Graham > <pf...@mac.com> wrote: > > > On 9-Jun-08, at 4:28 AM, Eli Naeher wrote: > > > > > Python 2.5.2 (r252:60911, Apr 17 2008, 13:15:05) > > > [GCC 4.2.3 (Debian 4.2.3-3)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > >>>> quit > > > Use quit() or Ctrl-D (i.e. EOF) to exit > > >>>> exit > > > Use exit() or Ctrl-D (i.e. EOF) to exit > > >>>> > > > > Python 2.5.1 (r251:54863, Apr 15 2008, 22:57:26) > > [GCC 4.0.1 (Apple Inc. build 5465)] on darwin > > Type "help", "copyright", "credits" or "license" for more information. > > >>> quit() > > Sophie:~ patrick$ > > > > Python 2.5.1 (r251:54863, Apr 15 2008, 22:57:26) > > [GCC 4.0.1 (Apple Inc. build 5465)] on darwin > > Type "help", "copyright", "credits" or "license" for more information. > > >>> ^D > > Sophie:~ patrick$ > > > > Considering you're writing code there, it doesn't seem unreasonable to > > actually type the () to make it a function call. > > considering he does NOT want to write code here, but he wants to stop, > quit, exit, or whatever, it is completely unreasonable to require the > parens. Very valid hate indeed.
But he is writing code. Interactive Python is like perls 'while (<>) {eval}'. So, one either stops the input stream (^D), or you call a function. And in Python, parenthesis aren't optional. Whitespace between a function name and parenthesis are, and don't change the meaning of the statement. > > Ctrl-D also works fairly well... > > Sure, but that's not the point here, is it. I've Python 2.4.1 on my system. And there neither quit() nor exit() will stop interactive Python - just ^D. > Ctrl-C also refuses to quit python: > > $ python > Python 2.5.1 (r251:54863, Jan 10 2008, 18:00:49) > [GCC 4.2.1 (SUSE Linux)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> ^C > KeyboardInterrupt Right. You're sending SIGINT - not SIGKILL, SIGTERM, nor SIGQUIT. It's not unreasonable to not terminate the program on receiving SIGINT. Abigail