1
# This is about all it requires to write a wish shell in Python!
6
tk = _tkinter.create(os.environ['DISPLAY'], 'wish', 'Tk', 1)
15
line = raw_input(prompt)
18
cmd = cmd + (line + '\n')
19
if tk.getboolean(tk.call('info', 'complete', cmd)):
22
result = tk.call('eval', cmd)
23
except _tkinter.TclError, msg:
24
print 'TclError:', msg
26
if result: print result