1 # This is about all it requires to write a wish shell in Python!
5 tk
= tkinter
.create(':0', 'wish', 'Tk', 1)
14 line
= raw_input(prompt
)
17 cmd
= cmd
+ (line
+ '\n')
18 if tk
.getboolean(tk
.call('info', 'complete', cmd
)):
21 result
= tk
.call('eval', cmd
)
22 except tkinter
.TclError
, msg
:
23 print 'TclError:', msg
25 if result
: print result