comparison cmd2.py @ 121:fe432d010ecc

going to attempt 2.4 and 2.6 compatibility
author catherine@dellzilla
date Wed, 29 Oct 2008 10:46:08 -0400
parents fe47c5b269cc
children e62aa2f58b7b
comparison
equal deleted inserted replaced
119:fe47c5b269cc 121:fe432d010ecc
611 f.close() 611 f.close()
612 return data 612 return data
613 613
614 class HistoryItem(str): 614 class HistoryItem(str):
615 def __init__(self, instr): 615 def __init__(self, instr):
616 str.__init__(self, instr) 616 str.__init__(self)
617 self.lowercase = self.lower() 617 self.lowercase = self.lower()
618 self.idx = None 618 self.idx = None
619 def pr(self): 619 def pr(self):
620 return '-------------------------[%d]\n%s\n' % (self.idx, str(self)) 620 return '-------------------------[%d]\n%s\n' % (self.idx, str(self))
621 621