parameters: (self, s)
return_statement: return segmentlist
docstring: Given a formatted string will return a list of \
                  StringSegment objects with their calculated widths.
docstring_summary: Given a formatted string will return a list of \
                  StringSegment objects with their calculated widths.
docstring_tokens: Given a formatted string will return a list of \ StringSegment objects with their calculated widths .
function: def parseSegments(self, s):
      "Given a formatted string will return a list of \
                  StringSegment objects with their calculated widths."
  
      # the xmlparser requires that all text be surrounded by xml
      # tags, therefore we must throw some unused flags around the
      # given string
      self.feed("<formattedstring>" + s + "</formattedstring>")
      self.close()  # force parsing to complete
      self.reset()  # get rid of any previous data
      segmentlist = self.segmentlist
      self.segmentlist = []
      return segmentlist
function_tokens: def parseSegments ( self , s ) : # the xmlparser requires that all text be surrounded by xml # tags, therefore we must throw some unused flags around the # given string self . feed ( "<formattedstring>" + s + "</formattedstring>" ) self . close ( ) # force parsing to complete self . reset ( ) # get rid of any previous data segmentlist = self . segmentlist self . segmentlist = [ ] return segmentlist