No guessing needed. If I just use os.system("clear") on its own, no
problem. Also, if I use the magic formula you gave on its own, that
works to. But in the app, (see below), neither command works. I'm
missing something obvious, but I'm... missing it.

def run(self, userinfo):
        """Time when to do stuff"""
        self.teamname = userinfo[0]
        self.username = userinfo[1]
        self.refreshinterval = userinfo[2]
        self.statsfile = userinfo[3]
        print self.username, "", self.teamname
        self.minutes = 0
        while 1:
            try:
                """ Checks for internet stats once per hour """
                if self.minutes == 0:
                    self.get_online_stats(self.statsfile)
                self.minutes += 1
                if self.minutes == 60:
                    self.minutes = 0
                self.output()
                time.sleep(60) #nite-nite
            except KeyboardInterrupt:#user types Ctrl-C
                print "Bye bye."
                os.system("clear")
                sys.exit()


    def output(self):
        os.system("clear") #clear the screen
        print "****************************************"
        print "*                   Monitor                  *"
        print "****************************************"
        print "*                                      *"
        self.get_unit_info('/opt/foldingathome/1/unitinfo.txt')#print
the current unit info
        print "\n  last updated at", time.strftime("%Y-%m-%d %H:%M:%S",
time.localtime(time.time()))
        print "*                                      *"
        print "*************    Stats    **************"
        print "*                                      *"
        self.get_saved_stats(self.statsfile)
        print "*                                      *"
        print "****************************************"

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to