tkinter/commands help

James Logajan JamesL at Lugoj.Com
Wed Jul 4 13:46:07 EDT 2001

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 mailing list