diff options
Diffstat (limited to 'Demo/tkinter/guido/wish.py')
-rwxr-xr-x | Demo/tkinter/guido/wish.py | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/Demo/tkinter/guido/wish.py b/Demo/tkinter/guido/wish.py index 4f6fdee..0a61ad8 100755 --- a/Demo/tkinter/guido/wish.py +++ b/Demo/tkinter/guido/wish.py @@ -9,19 +9,19 @@ tk.call('update') cmd = '' while 1: - if cmd: prompt = '' - else: prompt = '% ' - try: - line = raw_input(prompt) - except EOFError: - break - cmd = cmd + (line + '\n') - if tk.getboolean(tk.call('info', 'complete', cmd)): - tk.record(line) - try: - result = tk.call('eval', cmd) - except _tkinter.TclError, msg: - print 'TclError:', msg - else: - if result: print result - cmd = '' + if cmd: prompt = '' + else: prompt = '% ' + try: + line = raw_input(prompt) + except EOFError: + break + cmd = cmd + (line + '\n') + if tk.getboolean(tk.call('info', 'complete', cmd)): + tk.record(line) + try: + result = tk.call('eval', cmd) + except _tkinter.TclError, msg: + print 'TclError:', msg + else: + if result: print result + cmd = '' |