def msi(chars):
    '''Set terminal screen by ANSI code "MSI", and ignore for non-terminal output'''

    if sys.stdout.isatty():
        msi = u'\u009b'
        sys.stdout.write(msi + chars)
Set terminal screen by ANSI code "MSI", and ignore for non-terminal output
bin/more.py