[Tutor] Help with python parsing please..

SA sarmstrong13@mac.com
Sat, 20 Jul 2002 18:09:12 -0500


The following portion of my script is redirecting to the shell instead of
Python:
def expyth(self):
        self.t2.delete(0.0, END)
        self.output = commands.getoutput(self.t1.get(0.0, END))
        self.t2.insert(END, self.output)

Basically this part of my script takes the text I type in one window and
redirects the python output to another window. So I can write some script in
window one, this takes that text and parses the commands through Python and
displays the output in window 2.  Those of you that helped me a long time
ago with my IDLE program may remember this code. Needless to say, I've made
some sytem changes since the last time this script worked properly. Now it
is trying to parse the script through zsh instead of python and I'm getting
all kinds of errors. If there is some import command in the first window I
get a zsh error if the there is a from command (ie. From Tkinter import *) I
get an error about /var/mail/Tkinter.(No such thing on my system)

However if I write something simple like print "hello world", I get the
correct output in window two. I can't figure what the deal is. Any ideas?

Thanks.
SA


-- 
"I can do everything on my Mac I used to on my PC. Plus a lot more ..."
-Me