def pager_print(expr, **settings):
 from pydoc import pager
 from locale import getpreferredencoding
 if ('num_columns' not in settings):
  settings['num_columns'] = 500000
 pager(pretty(expr, **settings).encode(getpreferredencoding()))

def pager_print ( expr , ** settings ) : from pydoc import pager from locale import getpreferredencoding if ( 'num_columns' not in settings ) : settings [ 'num_columns' ] = 500000 pager ( pretty ( expr , ** settings ) . encode ( getpreferredencoding ( ) ) )
prints expr using the pager .