##// END OF EJS Templates
page_dumb mime bundle
Sylvain Corlay -
Show More
@@ -38,7 +38,7 b' def display_page(strng, start=0, screen_lines=25):'
38 else:
38 else:
39 if start:
39 if start:
40 strng = u'\n'.join(strng.splitlines()[start:])
40 strng = u'\n'.join(strng.splitlines()[start:])
41 data = {'text/plain': strng}
41 data = { 'text/plain': strng }
42 display(data, raw=True)
42 display(data, raw=True)
43
43
44
44
@@ -56,8 +56,10 b' def page_dumb(strng, start=0, screen_lines=25):'
56 """Very dumb 'pager' in Python, for when nothing else works.
56 """Very dumb 'pager' in Python, for when nothing else works.
57
57
58 Only moves forward, same interface as page(), except for pager_cmd and
58 Only moves forward, same interface as page(), except for pager_cmd and
59 mode."""
59 mode.
60
60 """
61 if isinstance(strng, dict):
62 strng = strng.get('text/plain', '')
61 out_ln = strng.splitlines()[start:]
63 out_ln = strng.splitlines()[start:]
62 screens = chop(out_ln,screen_lines-1)
64 screens = chop(out_ln,screen_lines-1)
63 if len(screens) == 1:
65 if len(screens) == 1:
General Comments 0
You need to be logged in to leave comments. Login now