<spanid="evennia-utils-evmore"></span><h1>evennia.utils.evmore<aclass="headerlink"href="#module-evennia.utils.evmore"title="Link to this heading">¶</a></h1>
<p>EvMore - pager mechanism</p>
<p>This is a pager for displaying long texts and allows stepping up and down in
the text (the name comes from the traditional ‘more’ unix command).</p>
<p>To use, simply pass the text through the EvMore object:</p>
<emclass="property"><spanclass="k"><spanclass="pre">class</span></span><spanclass="w"></span></em><spanclass="sig-prename descclassname"><spanclass="pre">evennia.utils.evmore.</span></span><spanclass="sig-name descname"><spanclass="pre">CmdMore</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="o"><spanclass="pre">**</span></span><spanclass="n"><spanclass="pre">kwargs</span></span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/utils/evmore.html#CmdMore"><spanclass="viewcode-link"><spanclass="pre">[source]</span></span></a><aclass="headerlink"href="#evennia.utils.evmore.CmdMore"title="Link to this definition">¶</a></dt>
<spanclass="sig-name descname"><spanclass="pre">key</span></span><emclass="property"><spanclass="w"></span><spanclass="p"><spanclass="pre">=</span></span><spanclass="w"></span><spanclass="pre">'__noinput_command'</span></em><aclass="headerlink"href="#evennia.utils.evmore.CmdMore.key"title="Link to this definition">¶</a></dt>
<spanclass="sig-name descname"><spanclass="pre">aliases</span></span><emclass="property"><spanclass="w"></span><spanclass="p"><spanclass="pre">=</span></span><spanclass="w"></span><spanclass="pre">['top',</span><spanclass="pre">'a',</span><spanclass="pre">'quit',</span><spanclass="pre">'previous',</span><spanclass="pre">'abort',</span><spanclass="pre">'p',</span><spanclass="pre">'e',</span><spanclass="pre">'next',</span><spanclass="pre">'t',</span><spanclass="pre">'end',</span><spanclass="pre">'n',</span><spanclass="pre">'q']</span></em><aclass="headerlink"href="#evennia.utils.evmore.CmdMore.aliases"title="Link to this definition">¶</a></dt>
<spanclass="sig-name descname"><spanclass="pre">auto_help</span></span><emclass="property"><spanclass="w"></span><spanclass="p"><spanclass="pre">=</span></span><spanclass="w"></span><spanclass="pre">False</span></em><aclass="headerlink"href="#evennia.utils.evmore.CmdMore.auto_help"title="Link to this definition">¶</a></dt>
<spanclass="sig-name descname"><spanclass="pre">func</span></span><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/utils/evmore.html#CmdMore.func"><spanclass="viewcode-link"><spanclass="pre">[source]</span></span></a><aclass="headerlink"href="#evennia.utils.evmore.CmdMore.func"title="Link to this definition">¶</a></dt>
<spanclass="sig-name descname"><spanclass="pre">help_category</span></span><emclass="property"><spanclass="w"></span><spanclass="p"><spanclass="pre">=</span></span><spanclass="w"></span><spanclass="pre">'general'</span></em><aclass="headerlink"href="#evennia.utils.evmore.CmdMore.help_category"title="Link to this definition">¶</a></dt>
<spanclass="sig-name descname"><spanclass="pre">lock_storage</span></span><emclass="property"><spanclass="w"></span><spanclass="p"><spanclass="pre">=</span></span><spanclass="w"></span><spanclass="pre">'cmd:all();'</span></em><aclass="headerlink"href="#evennia.utils.evmore.CmdMore.lock_storage"title="Link to this definition">¶</a></dt>
<spanclass="sig-name descname"><spanclass="pre">search_index_entry</span></span><emclass="property"><spanclass="w"></span><spanclass="p"><spanclass="pre">=</span></span><spanclass="w"></span><spanclass="pre">{'aliases':</span><spanclass="pre">'top</span><spanclass="pre">a</span><spanclass="pre">quit</span><spanclass="pre">previous</span><spanclass="pre">abort</span><spanclass="pre">p</span><spanclass="pre">e</span><spanclass="pre">next</span><spanclass="pre">t</span><spanclass="pre">end</span><spanclass="pre">n</span><spanclass="pre">q',</span><spanclass="pre">'category':</span><spanclass="pre">'general',</span><spanclass="pre">'key':</span><spanclass="pre">'__noinput_command',</span><spanclass="pre">'no_prefix':</span><spanclass="pre">'</span><spanclass="pre">top</span><spanclass="pre">a</span><spanclass="pre">quit</span><spanclass="pre">previous</span><spanclass="pre">abort</span><spanclass="pre">p</span><spanclass="pre">e</span><spanclass="pre">next</span><spanclass="pre">t</span><spanclass="pre">end</span><spanclass="pre">n</span><spanclass="pre">q',</span><spanclass="pre">'tags':</span><spanclass="pre">'',</span><spanclass="pre">'text':</span><spanclass="pre">'\nManipulate</span><spanclass="pre">the</span><spanclass="pre">text</span><spanclass="pre">paging.</span><spanclass="pre">Catch</span><spanclass="pre">no-input</span><spanclass="pre">with</span><spanclass="pre">aliases.\n'}</span></em><aclass="headerlink"href="#evennia.utils.evmore.CmdMore.search_index_entry"title="Link to this definition">¶</a></dt>
<emclass="property"><spanclass="k"><spanclass="pre">class</span></span><spanclass="w"></span></em><spanclass="sig-prename descclassname"><spanclass="pre">evennia.utils.evmore.</span></span><spanclass="sig-name descname"><spanclass="pre">CmdMoreExit</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="o"><spanclass="pre">**</span></span><spanclass="n"><spanclass="pre">kwargs</span></span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/utils/evmore.html#CmdMoreExit"><spanclass="viewcode-link"><spanclass="pre">[source]</span></span></a><aclass="headerlink"href="#evennia.utils.evmore.CmdMoreExit"title="Link to this definition">¶</a></dt>
<spanclass="sig-name descname"><spanclass="pre">key</span></span><emclass="property"><spanclass="w"></span><spanclass="p"><spanclass="pre">=</span></span><spanclass="w"></span><spanclass="pre">'__nomatch_command'</span></em><aclass="headerlink"href="#evennia.utils.evmore.CmdMoreExit.key"title="Link to this definition">¶</a></dt>
<spanclass="sig-name descname"><spanclass="pre">func</span></span><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/utils/evmore.html#CmdMoreExit.func"><spanclass="viewcode-link"><spanclass="pre">[source]</span></span></a><aclass="headerlink"href="#evennia.utils.evmore.CmdMoreExit.func"title="Link to this definition">¶</a></dt>
<dd><p>Exit pager and re-fire the failed command.</p>
<spanclass="sig-name descname"><spanclass="pre">aliases</span></span><emclass="property"><spanclass="w"></span><spanclass="p"><spanclass="pre">=</span></span><spanclass="w"></span><spanclass="pre">[]</span></em><aclass="headerlink"href="#evennia.utils.evmore.CmdMoreExit.aliases"title="Link to this definition">¶</a></dt>
<spanclass="sig-name descname"><spanclass="pre">help_category</span></span><emclass="property"><spanclass="w"></span><spanclass="p"><spanclass="pre">=</span></span><spanclass="w"></span><spanclass="pre">'general'</span></em><aclass="headerlink"href="#evennia.utils.evmore.CmdMoreExit.help_category"title="Link to this definition">¶</a></dt>
<spanclass="sig-name descname"><spanclass="pre">lock_storage</span></span><emclass="property"><spanclass="w"></span><spanclass="p"><spanclass="pre">=</span></span><spanclass="w"></span><spanclass="pre">'cmd:all();'</span></em><aclass="headerlink"href="#evennia.utils.evmore.CmdMoreExit.lock_storage"title="Link to this definition">¶</a></dt>
<spanclass="sig-name descname"><spanclass="pre">search_index_entry</span></span><emclass="property"><spanclass="w"></span><spanclass="p"><spanclass="pre">=</span></span><spanclass="w"></span><spanclass="pre">{'aliases':</span><spanclass="pre">'',</span><spanclass="pre">'category':</span><spanclass="pre">'general',</span><spanclass="pre">'key':</span><spanclass="pre">'__nomatch_command',</span><spanclass="pre">'no_prefix':</span><spanclass="pre">'</span><spanclass="pre">',</span><spanclass="pre">'tags':</span><spanclass="pre">'',</span><spanclass="pre">'text':</span><spanclass="pre">'\nAny</span><spanclass="pre">non-more</span><spanclass="pre">command</span><spanclass="pre">will</span><spanclass="pre">exit</span><spanclass="pre">the</span><spanclass="pre">pager.\n\n'}</span></em><aclass="headerlink"href="#evennia.utils.evmore.CmdMoreExit.search_index_entry"title="Link to this definition">¶</a></dt>
<emclass="property"><spanclass="k"><spanclass="pre">class</span></span><spanclass="w"></span></em><spanclass="sig-prename descclassname"><spanclass="pre">evennia.utils.evmore.</span></span><spanclass="sig-name descname"><spanclass="pre">CmdSetMore</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">cmdsetobj</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">None</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">key</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">None</span></span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/utils/evmore.html#CmdSetMore"><spanclass="viewcode-link"><spanclass="pre">[source]</span></span></a><aclass="headerlink"href="#evennia.utils.evmore.CmdSetMore"title="Link to this definition">¶</a></dt>
<spanclass="sig-name descname"><spanclass="pre">key</span></span><emclass="property"><spanclass="w"></span><spanclass="p"><spanclass="pre">=</span></span><spanclass="w"></span><spanclass="pre">'more_commands'</span></em><aclass="headerlink"href="#evennia.utils.evmore.CmdSetMore.key"title="Link to this definition">¶</a></dt>
<spanclass="sig-name descname"><spanclass="pre">priority</span></span><emclass="property"><spanclass="w"></span><spanclass="p"><spanclass="pre">=</span></span><spanclass="w"></span><spanclass="pre">110</span></em><aclass="headerlink"href="#evennia.utils.evmore.CmdSetMore.priority"title="Link to this definition">¶</a></dt>
<spanclass="sig-name descname"><spanclass="pre">mergetype</span></span><emclass="property"><spanclass="w"></span><spanclass="p"><spanclass="pre">=</span></span><spanclass="w"></span><spanclass="pre">'Replace'</span></em><aclass="headerlink"href="#evennia.utils.evmore.CmdSetMore.mergetype"title="Link to this definition">¶</a></dt>
<spanclass="sig-name descname"><spanclass="pre">at_cmdset_creation</span></span><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/utils/evmore.html#CmdSetMore.at_cmdset_creation"><spanclass="viewcode-link"><spanclass="pre">[source]</span></span></a><aclass="headerlink"href="#evennia.utils.evmore.CmdSetMore.at_cmdset_creation"title="Link to this definition">¶</a></dt>
<dd><p>Hook method - this should be overloaded in the inheriting
class, and should take care of populating the cmdset by use of
<spanclass="sig-name descname"><spanclass="pre">path</span></span><emclass="property"><spanclass="w"></span><spanclass="p"><spanclass="pre">=</span></span><spanclass="w"></span><spanclass="pre">'evennia.utils.evmore.CmdSetMore'</span></em><aclass="headerlink"href="#evennia.utils.evmore.CmdSetMore.path"title="Link to this definition">¶</a></dt>
<spanclass="sig-prename descclassname"><spanclass="pre">evennia.utils.evmore.</span></span><spanclass="sig-name descname"><spanclass="pre">queryset_maxsize</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">qs</span></span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/utils/evmore.html#queryset_maxsize"><spanclass="viewcode-link"><spanclass="pre">[source]</span></span></a><aclass="headerlink"href="#evennia.utils.evmore.queryset_maxsize"title="Link to this definition">¶</a></dt>
<li><p><strong>caller</strong> (<em>Object</em><em> or </em><em>Account</em>) – Entity reading the text.</p></li>
<li><p><strong>inp</strong> (<em>str</em><em>, </em><aclass="reference internal"href="evennia.commands.default.building.html#evennia.commands.default.building.EvTable"title="evennia.commands.default.building.EvTable"><em>EvTable</em></a><em>, </em><aclass="reference internal"href="evennia.commands.default.building.html#evennia.commands.default.building.Paginator"title="evennia.commands.default.building.Paginator"><em>Paginator</em></a><em> or </em><em>iterator</em>) –<p>The text or data to put under paging.</p>
<ul>
<li><p>If a string, paginage normally. If this text contains
one or more <strong>\f</strong> format symbol, automatic pagination and justification
are force-disabled and page-breaks will only happen after each <strong>\f</strong>.</p></li>
<li><p>If <strong>EvTable</strong>, the EvTable will be paginated with the same
setting on each page if it is too long. The table
decorations will be considered in the size of the page.</p></li>
<li><p>Otherwise <strong>inp</strong> is converted to an iterator, where each step is
expected to be a line in the final display. Each line
will be run through <strong>iter_callable</strong>.</p></li>
</ul>
</p></li>
<li><p><strong>always_page</strong> (<em>bool</em><em>, </em><em>optional</em>) – If <strong>False</strong>, the
pager will only kick in if <strong>inp</strong> is too big
to fit the screen.</p></li>
<li><p><strong>session</strong> (<aclass="reference internal"href="evennia.server.session.html#evennia.server.session.Session"title="evennia.server.session.Session"><em>Session</em></a><em>, </em><em>optional</em>) – If given, this session will be used
to determine the screen width and will receive all output.</p></li>
<li><p><strong>justify</strong> (<em>bool</em><em>, </em><em>optional</em>) – If set, auto-justify long lines. This must be turned
off for fixed-width or formatted output, like tables. It’s force-disabled
if <strong>inp</strong> is an EvTable.</p></li>
<li><p><strong>justify_kwargs</strong> (<em>dict</em><em>, </em><em>optional</em>) – Keywords for the justify function. Used only
if <strong>justify</strong> is True. If this is not set, default arguments will be used.</p></li>
<li><p><strong>exit_on_lastpage</strong> (<em>bool</em><em>, </em><em>optional</em>) – If reaching the last page without the
page being completely filled, exit pager immediately. If unset,
another move forward is required to exit. If set, the pager
exit message will not be shown.</p></li>
<li><p><strong>exit_cmd</strong> (<em>str</em><em>, </em><em>optional</em>) – If given, this command-string will be executed on
the caller when the more page exits. Note that this will be using whatever
cmdset the user had <em>before</em> the evmore pager was activated (so none of
the evmore commands will be available when this is run).</p></li>
<li><p><strong>kwargs</strong> (<em>any</em><em>, </em><em>optional</em>) – These will be passed on to the <strong>caller.msg</strong> method. Notably,
one can pass additional outputfuncs this way. There is one special kwarg:
- <strong>text_kwargs</strong> - extra kwargs to pass with the text outputfunc, e.g.
<strong>text_kwargs={“type”: “help”}</strong> would result to each page being sent
to <strong>msg</strong> as <strong>text=(pagetxt, {“type”: “help”})</strong>.</p></li>
<spanclass="n">pages</span><spanclass="o">=</span><spanclass="n">Paginator</span><spanclass="p">(</span><spanclass="n">query</span><spanclass="p">,</span><spanclass="mi">10</span><spanclass="p">)</span><spanclass="c1"># 10 objs per page</span>
<spanclass="sig-name descname"><spanclass="pre">display</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">show_footer</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">True</span></span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/utils/evmore.html#EvMore.display"><spanclass="viewcode-link"><spanclass="pre">[source]</span></span></a><aclass="headerlink"href="#evennia.utils.evmore.EvMore.display"title="Link to this definition">¶</a></dt>
<spanclass="sig-name descname"><spanclass="pre">page_top</span></span><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/utils/evmore.html#EvMore.page_top"><spanclass="viewcode-link"><spanclass="pre">[source]</span></span></a><aclass="headerlink"href="#evennia.utils.evmore.EvMore.page_top"title="Link to this definition">¶</a></dt>
<spanclass="sig-name descname"><spanclass="pre">page_end</span></span><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/utils/evmore.html#EvMore.page_end"><spanclass="viewcode-link"><spanclass="pre">[source]</span></span></a><aclass="headerlink"href="#evennia.utils.evmore.EvMore.page_end"title="Link to this definition">¶</a></dt>
<spanclass="sig-name descname"><spanclass="pre">page_next</span></span><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/utils/evmore.html#EvMore.page_next"><spanclass="viewcode-link"><spanclass="pre">[source]</span></span></a><aclass="headerlink"href="#evennia.utils.evmore.EvMore.page_next"title="Link to this definition">¶</a></dt>
<dd><p>Scroll the text to the next page. Quit if already at the end
<spanclass="sig-name descname"><spanclass="pre">page_back</span></span><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/utils/evmore.html#EvMore.page_back"><spanclass="viewcode-link"><spanclass="pre">[source]</span></span></a><aclass="headerlink"href="#evennia.utils.evmore.EvMore.page_back"title="Link to this definition">¶</a></dt>
<dd><p>Scroll the text back up, at the most to the top.</p>
<spanclass="sig-name descname"><spanclass="pre">page_quit</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">quiet</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">False</span></span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/utils/evmore.html#EvMore.page_quit"><spanclass="viewcode-link"><spanclass="pre">[source]</span></span></a><aclass="headerlink"href="#evennia.utils.evmore.EvMore.page_quit"title="Link to this definition">¶</a></dt>
<spanclass="sig-name descname"><spanclass="pre">start</span></span><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/utils/evmore.html#EvMore.start"><spanclass="viewcode-link"><spanclass="pre">[source]</span></span></a><aclass="headerlink"href="#evennia.utils.evmore.EvMore.start"title="Link to this definition">¶</a></dt>
<spanclass="sig-name descname"><spanclass="pre">paginator_index</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">pageno</span></span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/utils/evmore.html#EvMore.paginator_index"><spanclass="viewcode-link"><spanclass="pre">[source]</span></span></a><aclass="headerlink"href="#evennia.utils.evmore.EvMore.paginator_index"title="Link to this definition">¶</a></dt>
<spanclass="sig-name descname"><spanclass="pre">paginator_slice</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">pageno</span></span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/utils/evmore.html#EvMore.paginator_slice"><spanclass="viewcode-link"><spanclass="pre">[source]</span></span></a><aclass="headerlink"href="#evennia.utils.evmore.EvMore.paginator_slice"title="Link to this definition">¶</a></dt>
<dd><p>Paginate by slice. This is done with an eye on memory efficiency (usually for
querysets); to avoid fetching all objects at the same time.</p>
<spanclass="sig-name descname"><spanclass="pre">paginator_django</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">pageno</span></span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/utils/evmore.html#EvMore.paginator_django"><spanclass="viewcode-link"><spanclass="pre">[source]</span></span></a><aclass="headerlink"href="#evennia.utils.evmore.EvMore.paginator_django"title="Link to this definition">¶</a></dt>
<dd><p>Paginate using the django queryset Paginator API. Note that his is indexed from 1.</p>
<spanclass="sig-name descname"><spanclass="pre">init_evtable</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">table</span></span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/utils/evmore.html#EvMore.init_evtable"><spanclass="viewcode-link"><spanclass="pre">[source]</span></span></a><aclass="headerlink"href="#evennia.utils.evmore.EvMore.init_evtable"title="Link to this definition">¶</a></dt>
<spanclass="sig-name descname"><spanclass="pre">init_queryset</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">qs</span></span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/utils/evmore.html#EvMore.init_queryset"><spanclass="viewcode-link"><spanclass="pre">[source]</span></span></a><aclass="headerlink"href="#evennia.utils.evmore.EvMore.init_queryset"title="Link to this definition">¶</a></dt>
<spanclass="sig-name descname"><spanclass="pre">init_django_paginator</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">pages</span></span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/utils/evmore.html#EvMore.init_django_paginator"><spanclass="viewcode-link"><spanclass="pre">[source]</span></span></a><aclass="headerlink"href="#evennia.utils.evmore.EvMore.init_django_paginator"title="Link to this definition">¶</a></dt>
<dd><p>The input is a django Paginator object.</p>
<spanclass="sig-name descname"><spanclass="pre">init_iterable</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">inp</span></span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/utils/evmore.html#EvMore.init_iterable"><spanclass="viewcode-link"><spanclass="pre">[source]</span></span></a><aclass="headerlink"href="#evennia.utils.evmore.EvMore.init_iterable"title="Link to this definition">¶</a></dt>
<dd><p>The input is something other than a string - convert to iterable of strings</p>
<spanclass="sig-name descname"><spanclass="pre">init_f_str</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">text</span></span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/utils/evmore.html#EvMore.init_f_str"><spanclass="viewcode-link"><spanclass="pre">[source]</span></span></a><aclass="headerlink"href="#evennia.utils.evmore.EvMore.init_f_str"title="Link to this definition">¶</a></dt>
<dd><p>The input contains <strong>f</strong> markers. We use <strong>f</strong> to indicate the user wants to
enforce their line breaks on their own. If so, we do no automatic
<spanclass="sig-name descname"><spanclass="pre">init_str</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">text</span></span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/utils/evmore.html#EvMore.init_str"><spanclass="viewcode-link"><spanclass="pre">[source]</span></span></a><aclass="headerlink"href="#evennia.utils.evmore.EvMore.init_str"title="Link to this definition">¶</a></dt>
<spanclass="sig-name descname"><spanclass="pre">init_pages</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">inp</span></span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/utils/evmore.html#EvMore.init_pages"><spanclass="viewcode-link"><spanclass="pre">[source]</span></span></a><aclass="headerlink"href="#evennia.utils.evmore.EvMore.init_pages"title="Link to this definition">¶</a></dt>
<dd><p>Initialize the pagination. By default, will analyze input type to determine
<spanclass="sig-name descname"><spanclass="pre">paginator</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">pageno</span></span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/utils/evmore.html#EvMore.paginator"><spanclass="viewcode-link"><spanclass="pre">[source]</span></span></a><aclass="headerlink"href="#evennia.utils.evmore.EvMore.paginator"title="Link to this definition">¶</a></dt>
<dd><p>Paginator. The data operated upon is in <strong>self._data</strong>.</p>
<spanclass="sig-name descname"><spanclass="pre">page_formatter</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">page</span></span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/utils/evmore.html#EvMore.page_formatter"><spanclass="viewcode-link"><spanclass="pre">[source]</span></span></a><aclass="headerlink"href="#evennia.utils.evmore.EvMore.page_formatter"title="Link to this definition">¶</a></dt>
<dd><p>Page formatter. Every page passes through this method. Override
it to customize behavior per-page. A common use is to generate a new
EvTable for every page (this is more efficient than to generate one huge
EvTable across many pages and feed it into EvMore all at once).</p>
<li><p><strong>caller</strong> (<em>Object</em><em> or </em><em>Account</em>) – Entity reading the text.</p></li>
<li><p><strong>inp</strong> (<em>str</em><em>, </em><aclass="reference internal"href="evennia.commands.default.building.html#evennia.commands.default.building.EvTable"title="evennia.commands.default.building.EvTable"><em>EvTable</em></a><em>, </em><aclass="reference internal"href="evennia.commands.default.building.html#evennia.commands.default.building.Paginator"title="evennia.commands.default.building.Paginator"><em>Paginator</em></a><em> or </em><em>iterator</em>) –<p>The text or data to put under paging.</p>
<ul>
<li><p>If a string, paginage normally. If this text contains
one or more <strong>\f</strong> format symbol, automatic pagination and justification
are force-disabled and page-breaks will only happen after each <strong>\f</strong>.</p></li>
<li><p>If <strong>EvTable</strong>, the EvTable will be paginated with the same
setting on each page if it is too long. The table
decorations will be considered in the size of the page.</p></li>
<li><p>Otherwise <strong>inp</strong> is converted to an iterator, where each step is
expected to be a line in the final display. Each line
will be run through <strong>iter_callable</strong>.</p></li>
</ul>
</p></li>
<li><p><strong>always_page</strong> (<em>bool</em><em>, </em><em>optional</em>) – If <strong>False</strong>, the
pager will only kick in if <strong>inp</strong> is too big
to fit the screen.</p></li>
<li><p><strong>session</strong> (<aclass="reference internal"href="evennia.server.session.html#evennia.server.session.Session"title="evennia.server.session.Session"><em>Session</em></a><em>, </em><em>optional</em>) – If given, this session will be used
to determine the screen width and will receive all output.</p></li>
<li><p><strong>justify</strong> (<em>bool</em><em>, </em><em>optional</em>) – If set, auto-justify long lines. This must be turned
off for fixed-width or formatted output, like tables. It’s force-disabled
if <strong>inp</strong> is an EvTable.</p></li>
<li><p><strong>justify_kwargs</strong> (<em>dict</em><em>, </em><em>optional</em>) – Keywords for the justify function. Used only
if <strong>justify</strong> is True. If this is not set, default arguments will be used.</p></li>
<li><p><strong>exit_on_lastpage</strong> (<em>bool</em><em>, </em><em>optional</em>) – If reaching the last page without the
page being completely filled, exit pager immediately. If unset,
another move forward is required to exit. If set, the pager
exit message will not be shown.</p></li>
<li><p><strong>exit_cmd</strong> (<em>str</em><em>, </em><em>optional</em>) – If given, this command-string will be executed on
the caller when the more page exits. Note that this will be using whatever
cmdset the user had <em>before</em> the evmore pager was activated (so none of
the evmore commands will be available when this is run).</p></li>
<li><p><strong>kwargs</strong> (<em>any</em><em>, </em><em>optional</em>) – These will be passed on to the <strong>caller.msg</strong> method. Notably,
one can pass additional outputfuncs this way. There is one special kwarg:
- <strong>text_kwargs</strong> - extra kwargs to pass with the text outputfunc, e.g.
<strong>text_kwargs={“type”: “help”}</strong> would result to each page being sent
to <strong>msg</strong> as <strong>text=(pagetxt, {“type”: “help”})</strong>.</p></li>
<spanclass="n">pages</span><spanclass="o">=</span><spanclass="n">Paginator</span><spanclass="p">(</span><spanclass="n">query</span><spanclass="p">,</span><spanclass="mi">10</span><spanclass="p">)</span><spanclass="c1"># 10 objs per page</span>