[Python-Dev] quit() on the prompt
Crutcher Dunnavant
crutcher at gmail.com
Wed Mar 8 00:26:17 CET 2006
More information about the Python-Dev mailing list
Wed Mar 8 00:26:17 CET 2006
- Previous message: [Python-Dev] quit() on the prompt
- Next message: [Python-Dev] quit() on the prompt
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I am probably the biggest proponent of magic variables, but this just won't work. First, commands and lines are not the same thing, so: print \ exit breaks your propossal. Second, quit and exit are bindable variables, and you need to be sure that they still mean _quit_, and not something else. On 3/7/06, BJörn Lindqvist <bjourne at gmail.com> wrote: > do { > cmd = readline() > do_stuff_with_cmd(cmd); > } while (!strcmp(cmd, "quit")); > printf("Bye!"); > exit(0); > > KISS? > > -- > mvh Björn > _______________________________________________ > Python-Dev mailing list > Python-Dev at python.org > http://mail.python.org/mailman/listinfo/python-dev > Unsubscribe: http://mail.python.org/mailman/options/python-dev/crutcher%40gmail.com > -- Crutcher Dunnavant <crutcher at gmail.com> littlelanguages.com monket.samedi-studios.com
- Previous message: [Python-Dev] quit() on the prompt
- Next message: [Python-Dev] quit() on the prompt
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-Dev mailing list