# This is code to format a string into any number # of columns # # Author: Shaun Dircks # CS112 - Spring 2008 def parseline(line, start=0, end=75): maxLength = end space =1 while space > 0: space = line.rfind(' ',start,end) if end > len(line): print line[start:len(line)], break else: print line[start:space] start = space + 1 end = space + maxLength parseline('Personal firewall software may warn about the connection IDLE \ makes to its subprocess using this computers internal loopback \ interface. This connection is not visible on any external \ interface and no data is sent to or received from the Internet.', 0, 70)