aramanat at optonline.net
Thu Jul 5 00:29:44 CEST 2001
oops! I am sorry,
my text was actually initialized like this
mytext = Text(root,width='40',height='25')
I mistyped it as text instead of mytext in my previous posting.
result = str(time.time())
It does work. Every time I hit the button.
James Logajan wrote:
> Arun Ramanathan wrote:
> > I am trying to run a rsh command from the commands module.
> > My code for a tkinter button and call back looks like this.
> > from Tkinter import *
> > import commands
> > def callme():
> > result = commands.getoutput('rsh -l username hostname showrev -p')
> > mytext.delete(0.0,END)
> > mytext.insert(0.0,result)
> What happens when you substitute something like:
> def callme():
> import time
> result = str(time.time())
> Does that work? Also, you snipped too much code; you show "mytext" but don't
> show what it has been initialized to. That is all I can suggest since I
> don't have enough information to do more.
More information about the Python-list