Unless there is more going on that you haven't shown... -------- returnedval= ord(output) if count == 1: errorarray[byte]=returnedval # store the ASCII value byte = byte +1 StatusText += "%x%x%x%x" % tuple(errorarray) self.frame.SetStatusText(StatusText) --------- Should achieve the same with fewer conversions. Alan G.