@ValidateLarchPlugin
def show_more(text, filename=None, writer=None,
              pagelength=30, prefix='', _larch=None, **kws):
    """show lines of text in the style of more """
    txt = text[:]
    if isinstance(txt, (str, unicode)):
        txt = txt.split('\n')
    if len(txt) <1:
        return
    prompt = '== hit return for more, q to quit'
    ps = "%s (%%.2f%%%%) == " % prompt
    if filename:
        ps = "%s (%%.2f%%%%  of %s) == " % (prompt, filename)

    if writer is None:
        writer = sys.stdout

    i = 0
    for i in range(len(txt)):
        if txt[i].endswith('\n'):
            _larch.writer.write("%s%s" % (prefix, txt[i]))
        else:
            writer.write("%s%s\n" % (prefix, txt[i]))
        i = i + 1
        if i % pagelength == 0:
            try:
                x = raw_input(ps %  (100.*i/len(txt)))
                if x in ('q','Q'): return
            except KeyboardInterrupt:
                writer.write("\n")
                return
dataset/ETHPy150Open xraypy/xraylarch/plugins/std/shellutils.py/show_more/original