parameters: ()
docstring: Returns: an integer, the width of help lines that is used in TextWrap.
docstring_summary: Returns: an integer, the width of help lines that is used in TextWrap.
docstring_tokens: Returns : an integer the width of help lines that is used in TextWrap .
function: def GetHelpWidth():
    """Returns: an integer, the width of help lines that is used in TextWrap."""
    if (not sys.stdout.isatty()) or (termios is None) or (fcntl is None):
      return _help_width
    try:
      data = fcntl.ioctl(sys.stdout, termios.TIOCGWINSZ, '1234')
      columns = struct.unpack('hh', data)[1]
      # Emacs mode returns 0.
      # Here we assume that any value below 40 is unreasonable
      if columns >= 40:
        return columns
      # Returning an int as default is fine, int(int) just return the int.
      return int(os.getenv('COLUMNS', _help_width))
  
    except (TypeError, IOError, struct.error):
      return _help_width
function_tokens: def GetHelpWidth ( ) : if ( not sys . stdout . isatty ( ) ) or ( termios is None ) or ( fcntl is None ) : return _help_width try : data = fcntl . ioctl ( sys . stdout , termios . TIOCGWINSZ , '1234' ) columns = struct . unpack ( 'hh' , data ) [ 1 ] # Emacs mode returns 0. # Here we assume that any value below 40 is unreasonable if columns >= 40 : return columns # Returning an int as default is fine, int(int) just return the int. return int ( os . getenv ( 'COLUMNS' , _help_width ) ) except ( TypeError , IOError , struct . error ) : return _help_width