8 def __init__(self, text):
12 def expand(self, padding=None, paddingchar=" ", dir=None):
13 if len(self.text) <= 10:
17 padding = len(self.text) / 2
19 format = "%-" + str(padding) + "." + str(padding) + "s"
20 pad = string.replace(format % " "," ",paddingchar)
21 padtext = self.text + pad
24 for x in range(0,len(padtext)):
25 expansion.append(padtext[x:] + padtext[:x])
32 if __name__ == '__main__':
33 h = HorizScroll("hello cruel world")
37 sys.stdout.write("\r")