How to I get the exception message as string in GUI

fowlertrainer at anonym.hu fowlertrainer at anonym.hu
Thu Dec 4 10:01:08 CET 2003


Hello ,

  I want to get the exception error msg in string, but I don't want to
  save to file, or print.
  I want to show it in memo.

  How to I do it ?

        gd=GTMain.GameDatas
        s=self.Msg
        log="Log:\nStart loading"
        s.SetLabel(log)
        try:
            gd.LoadGamesDatas()
            log=log+"\nGame datas succesfully loaded."
        except:
            import traceback
            traceback.print_exc()   <--------- what I must write ?
            log=log+"\An error occured while loading !"
        s.SetLabel(log)

Thanx.

-- 
Best regards,
 fowlertrainer                          mailto:fowlertrainer at anonym.hu






More information about the Python-list mailing list