chrome/tools/history-viz.py
def PrettyPrint(self, include_host=True, include_path=True):
    """Pretty-print this URL in a form more suitable for the graph.

    This will elide very long paths and potentially puts newlines between parts
    of long components.  include_host and include_path determine whether to
    include the host and path in the output.

    Returns: the pretty-printed string."""
    MAX_LEN = 30  # Maximum length of a line in the output.
    parts = []
    if include_host:
      parts.append(self.host)
    if include_path:
      parts.append(self.path)
    parts.append(self.extra)
    lines = []
    line = ''
    for part in parts:
      if len(part) > MAX_LEN:
        part = part[0:MAX_LEN-3] + '...'
      if len(line)+len(part) > MAX_LEN:
        lines.append(line)
        line = ''
      line += part
    if len(line) > 0:
      lines.append(line)
    return '\n'.join(lines)
Pretty-print this URL in a form more suitable for the graph.

    This will elide very long paths and potentially puts newlines between parts
    of long components.  include_host and include_path determine whether to
    include the host and path in the output.

    Returns: the pretty-printed string.
Pretty-print this URL in a form more suitable for the graph.
This will elide very long paths and potentially puts newlines between parts
of long components.  include_host and include_path determine whether to
include the host and path in the output.

the pretty-printed string.
Pretty - print this URL in a form more suitable for the graph . This will elide very long paths and potentially puts newlines between parts of long components . include_host and include_path determine whether to include the host and path in the output . the pretty - printed string .
def PrettyPrint(self, include_host=True, include_path=True):
    MAX_LEN = 30  
    parts = []
    if include_host:
      parts.append(self.host)
    if include_path:
      parts.append(self.path)
    parts.append(self.extra)
    lines = []
    line = ''
    for part in parts:
      if len(part) > MAX_LEN:
        part = part[0:MAX_LEN-3] + '...'
      if len(line)+len(part) > MAX_LEN:
        lines.append(line)
        line = ''
      line += part
    if len(line) > 0:
      lines.append(line)
    return '\n'.join(lines)
def PrettyPrint ( self , include_host = True , include_path = True ) : MAX_LEN = 30 parts = [ ] if include_host : parts . append ( self . host ) if include_path : parts . append ( self . path ) parts . append ( self . extra ) lines = [ ] line = '' for part in parts : if len ( part ) > MAX_LEN : part = part [ 0 : MAX_LEN - 3 ] + '...' if len ( line ) + len ( part ) > MAX_LEN : lines . append ( line ) line = '' line += part if len ( line ) > 0 : lines . append ( line ) return '\n' . join ( lines )
Pretty-print this URL in a form more suitable for the graph.
Pretty - print this URL in a form more suitable for the graph .
"""Pretty-print this URL in a form more suitable for the graph.

    This will elide very long paths and potentially puts newlines between parts
    of long components.  include_host and include_path determine whether to
    include the host and path in the output.

    Returns: the pretty-printed string.""" # Maximum length of a line in the output.
self
include_host
include_path