Martin v. Löwis wrote: > > In short, I think it makes a lot of sense to support a bare "exit" and/or > > "quit" as a completely intuitive platform-independent newbie-friendly way to > > exit the interpreter. > > I can readily agree to this part of Fredrik's proposal. What slightly > bothers me is the hackish nature of the proposed implementation. here's my current proposal (see ping's post and my reply for background): if isinstance(exc_value, NameError) and not exc_info.tb_next: text = exc_value[0] name = ... extract name from nameerror string ... if sys.commandline.strip() == name: if name in ("exit", "quit"): raise SystemExit if name == "help": help() return ... any suggestions on how to improve this ? </F>
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4