parameters: (self, text, length=36)
return_statement: return chopped
docstring: Simple version of textwrap.  textwrap.fill() unfortunately chops lines at spaces
          and creates odd word boundaries.  Instead, we will chop the path without regard to
          spaces, but pay attention to path delimiters.
docstring_summary: Simple version of textwrap.  textwrap.fill() unfortunately chops lines at spaces
          and creates odd word boundaries.  Instead, we will chop the path without regard to
          spaces, but pay attention to path delimiters.
docstring_tokens: Simple version of textwrap . textwrap . fill () unfortunately chops lines at spaces and creates odd word boundaries . Instead we will chop the path without regard to spaces but pay attention to path delimiters .
function: def chopPath(self, text, length=36):
          """
          Simple version of textwrap.  textwrap.fill() unfortunately chops lines at spaces
          and creates odd word boundaries.  Instead, we will chop the path without regard to
          spaces, but pay attention to path delimiters.
          """
          chopped = ""
          textLen = len(text)
          start = 0
  
          while start < textLen:
              end = start + length
              if end > textLen:
                  end = textLen
  
              # see if we can find a delimiter to chop the path
              if end < textLen:
                  lastSep = text.rfind(os.sep, start, end + 1)
                  if lastSep != -1 and lastSep != start:
                      end = lastSep
  
              if len(chopped):
                  chopped = chopped + '\n' + text[start:end]
              else:
                  chopped = text[start:end]
  
              start = end
  
          return chopped
function_tokens: def chopPath ( self , text , length = 36 ) : chopped = "" textLen = len ( text ) start = 0 while start < textLen : end = start + length if end > textLen : end = textLen # see if we can find a delimiter to chop the path if end < textLen : lastSep = text . rfind ( os . sep , start , end + 1 ) if lastSep != - 1 and lastSep != start : end = lastSep if len ( chopped ) : chopped = chopped + '\n' + text [ start : end ] else : chopped = text [ start : end ] start = end return chopped