On Mon, 17 Apr 2000, Ka-Ping Yee wrote: > One gripe that i hear a lot is that it's really difficult > to cut and paste chunks of Python code when you're working > with the interpreter because the ">>> " and "... " prompts > keep getting in the way. Does anyone else often have or > hear of this problem? > > Here is a suggested solution: for interactive mode only, > the console maintains a flag "dropdots", initially false. > > After line = raw_input(">>> "): > if line[:4] in [">>> ", "... "]: > dropdots = 1 > line = line[4:] > else: > dropdots = 0 > interpret(line) Python 1.5.2 (#1, Feb 21 2000, 14:52:33) [GCC 2.95.2 19991024 (release)] on sunos5 Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam >>> a=[] >>> a[ ... ... ... ] Traceback (innermost last): File "<stdin>", line 1, in ? TypeError: sequence index must be integer >>> Sorry. -- Moshe Zadka <mzadka@geocities.com>. http://www.oreilly.com/news/prescod_0300.html http://www.linux.org.il -- we put the penguin in .com
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