<spanid="evennia-utils-evmore"></span><h1>evennia.utils.evmore<aclass="headerlink"href="#module-evennia.utils.evmore"title="Permalink to this headline">¶</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>
<p>Where always_page decides if the pager is used also if the text is not long
enough to need to scroll, session is used to determine which session to relay
to and <strong>justify_kwargs</strong> are kwargs to pass to <strong>utils.utils.justify</strong> in order to
change the formatting of the text. The remaining <strong>**kwargs</strong> will be passed on to
the <strong>caller.msg()</strong> construct every time the page is updated.</p>
<hrclass="docutils"/>
<dlclass="py class">
<dtid="evennia.utils.evmore.CmdMore">
<emclass="property">class </em><codeclass="sig-prename descclassname">evennia.utils.evmore.</code><codeclass="sig-name descname">CmdMore</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="o">**</span><spanclass="n">kwargs</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/utils/evmore.html#CmdMore"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.utils.evmore.CmdMore"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">key</code><emclass="property"> = '__noinput_command'</em><aclass="headerlink"href="#evennia.utils.evmore.CmdMore.key"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">auto_help</code><emclass="property"> = False</em><aclass="headerlink"href="#evennia.utils.evmore.CmdMore.auto_help"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="py method">
<dtid="evennia.utils.evmore.CmdMore.func">
<codeclass="sig-name descname">func</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/utils/evmore.html#CmdMore.func"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.utils.evmore.CmdMore.func"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">help_category</code><emclass="property"> = 'general'</em><aclass="headerlink"href="#evennia.utils.evmore.CmdMore.help_category"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">lock_storage</code><emclass="property"> = 'cmd:all();'</em><aclass="headerlink"href="#evennia.utils.evmore.CmdMore.lock_storage"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</dd></dl>
<dlclass="py class">
<dtid="evennia.utils.evmore.CmdMoreLook">
<emclass="property">class </em><codeclass="sig-prename descclassname">evennia.utils.evmore.</code><codeclass="sig-name descname">CmdMoreLook</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="o">**</span><spanclass="n">kwargs</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/utils/evmore.html#CmdMoreLook"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.utils.evmore.CmdMoreLook"title="Permalink to this definition">¶</a></dt>
<p>Override look to display window and prevent OOCLook from firing</p>
<dlclass="py attribute">
<dtid="evennia.utils.evmore.CmdMoreLook.key">
<codeclass="sig-name descname">key</code><emclass="property"> = 'look'</em><aclass="headerlink"href="#evennia.utils.evmore.CmdMoreLook.key"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="py attribute">
<dtid="evennia.utils.evmore.CmdMoreLook.aliases">
<codeclass="sig-name descname">aliases</code><emclass="property"> = ['l']</em><aclass="headerlink"href="#evennia.utils.evmore.CmdMoreLook.aliases"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">auto_help</code><emclass="property"> = False</em><aclass="headerlink"href="#evennia.utils.evmore.CmdMoreLook.auto_help"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="py method">
<dtid="evennia.utils.evmore.CmdMoreLook.func">
<codeclass="sig-name descname">func</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/utils/evmore.html#CmdMoreLook.func"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.utils.evmore.CmdMoreLook.func"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">help_category</code><emclass="property"> = 'general'</em><aclass="headerlink"href="#evennia.utils.evmore.CmdMoreLook.help_category"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">lock_storage</code><emclass="property"> = 'cmd:all();'</em><aclass="headerlink"href="#evennia.utils.evmore.CmdMoreLook.lock_storage"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</dd></dl>
<dlclass="py class">
<dtid="evennia.utils.evmore.CmdSetMore">
<emclass="property">class </em><codeclass="sig-prename descclassname">evennia.utils.evmore.</code><codeclass="sig-name descname">CmdSetMore</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">cmdsetobj</span><spanclass="o">=</span><spanclass="default_value">None</span></em>, <emclass="sig-param"><spanclass="n">key</span><spanclass="o">=</span><spanclass="default_value">None</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/utils/evmore.html#CmdSetMore"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.utils.evmore.CmdSetMore"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">key</code><emclass="property"> = 'more_commands'</em><aclass="headerlink"href="#evennia.utils.evmore.CmdSetMore.key"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="py attribute">
<dtid="evennia.utils.evmore.CmdSetMore.priority">
<codeclass="sig-name descname">priority</code><emclass="property"> = 110</em><aclass="headerlink"href="#evennia.utils.evmore.CmdSetMore.priority"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">at_cmdset_creation</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/utils/evmore.html#CmdSetMore.at_cmdset_creation"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.utils.evmore.CmdSetMore.at_cmdset_creation"title="Permalink 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
self.add().</p>
</dd></dl>
<dlclass="py attribute">
<dtid="evennia.utils.evmore.CmdSetMore.path">
<codeclass="sig-name descname">path</code><emclass="property"> = 'evennia.utils.evmore.CmdSetMore'</em><aclass="headerlink"href="#evennia.utils.evmore.CmdSetMore.path"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</dd></dl>
<dlclass="py function">
<dtid="evennia.utils.evmore.queryset_maxsize">
<codeclass="sig-prename descclassname">evennia.utils.evmore.</code><codeclass="sig-name descname">queryset_maxsize</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">qs</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/utils/evmore.html#queryset_maxsize"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.utils.evmore.queryset_maxsize"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="py class">
<dtid="evennia.utils.evmore.EvMore">
<emclass="property">class </em><codeclass="sig-prename descclassname">evennia.utils.evmore.</code><codeclass="sig-name descname">EvMore</code><spanclass="sig-paren">(</span><emclass="sig-param">caller</em>, <emclass="sig-param">inp</em>, <emclass="sig-param">always_page=False</em>, <emclass="sig-param">session=None</em>, <emclass="sig-param">justify=False</em>, <emclass="sig-param">justify_kwargs=None</em>, <emclass="sig-param">exit_on_lastpage=False</em>, <emclass="sig-param">exit_cmd=None</em>, <emclass="sig-param">page_formatter=<class 'str'></em>, <emclass="sig-param">**kwargs</em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/utils/evmore.html#EvMore"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.utils.evmore.EvMore"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">__init__</code><spanclass="sig-paren">(</span><emclass="sig-param">caller</em>, <emclass="sig-param">inp</em>, <emclass="sig-param">always_page=False</em>, <emclass="sig-param">session=None</em>, <emclass="sig-param">justify=False</em>, <emclass="sig-param">justify_kwargs=None</em>, <emclass="sig-param">exit_on_lastpage=False</em>, <emclass="sig-param">exit_cmd=None</em>, <emclass="sig-param">page_formatter=<class 'str'></em>, <emclass="sig-param">**kwargs</em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/utils/evmore.html#EvMore.__init__"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.utils.evmore.EvMore.__init__"title="Permalink to this definition">¶</a></dt>
<dd><p>Initialization of the Evmore input handler.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><ulclass="simple">
<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.utils.evtable.html#evennia.utils.evtable.EvTable"title="evennia.utils.evtable.EvTable"><em>EvTable</em></a><em>, </em><em>Paginator</em><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 \f (backslash + f) format symbols, automatic
pagination and justification are force-disabled and
page-breaks will only happen after each \f.</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 justifiy 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>any</em>) – These will be passed on to the <strong>caller.msg</strong> method.</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>
<codeclass="sig-name descname">display</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">show_footer</span><spanclass="o">=</span><spanclass="default_value">True</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/utils/evmore.html#EvMore.display"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.utils.evmore.EvMore.display"title="Permalink to this definition">¶</a></dt>
<dd><p>Pretty-print the page.</p>
</dd></dl>
<dlclass="py method">
<dtid="evennia.utils.evmore.EvMore.page_top">
<codeclass="sig-name descname">page_top</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/utils/evmore.html#EvMore.page_top"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.utils.evmore.EvMore.page_top"title="Permalink to this definition">¶</a></dt>
<dd><p>Display the top page</p>
</dd></dl>
<dlclass="py method">
<dtid="evennia.utils.evmore.EvMore.page_end">
<codeclass="sig-name descname">page_end</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/utils/evmore.html#EvMore.page_end"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.utils.evmore.EvMore.page_end"title="Permalink to this definition">¶</a></dt>
<dd><p>Display the bottom page.</p>
</dd></dl>
<dlclass="py method">
<dtid="evennia.utils.evmore.EvMore.page_next">
<codeclass="sig-name descname">page_next</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/utils/evmore.html#EvMore.page_next"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.utils.evmore.EvMore.page_next"title="Permalink to this definition">¶</a></dt>
<dd><p>Scroll the text to the next page. Quit if already at the end
of the page.</p>
</dd></dl>
<dlclass="py method">
<dtid="evennia.utils.evmore.EvMore.page_back">
<codeclass="sig-name descname">page_back</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/utils/evmore.html#EvMore.page_back"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.utils.evmore.EvMore.page_back"title="Permalink to this definition">¶</a></dt>
<dd><p>Scroll the text back up, at the most to the top.</p>
</dd></dl>
<dlclass="py method">
<dtid="evennia.utils.evmore.EvMore.page_quit">
<codeclass="sig-name descname">page_quit</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">quiet</span><spanclass="o">=</span><spanclass="default_value">False</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/utils/evmore.html#EvMore.page_quit"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.utils.evmore.EvMore.page_quit"title="Permalink to this definition">¶</a></dt>
<dd><p>Quit the pager</p>
</dd></dl>
<dlclass="py method">
<dtid="evennia.utils.evmore.EvMore.start">
<codeclass="sig-name descname">start</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/utils/evmore.html#EvMore.start"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.utils.evmore.EvMore.start"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">paginator_index</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">pageno</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/utils/evmore.html#EvMore.paginator_index"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.utils.evmore.EvMore.paginator_index"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">paginator_slice</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">pageno</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/utils/evmore.html#EvMore.paginator_slice"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.utils.evmore.EvMore.paginator_slice"title="Permalink 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>
<codeclass="sig-name descname">paginator_django</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">pageno</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/utils/evmore.html#EvMore.paginator_django"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.utils.evmore.EvMore.paginator_django"title="Permalink to this definition">¶</a></dt>
<dd><p>Paginate using the django queryset Paginator API. Note that his is indexed from 1.</p>
</dd></dl>
<dlclass="py method">
<dtid="evennia.utils.evmore.EvMore.init_evtable">
<codeclass="sig-name descname">init_evtable</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">table</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/utils/evmore.html#EvMore.init_evtable"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.utils.evmore.EvMore.init_evtable"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">init_queryset</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">qs</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/utils/evmore.html#EvMore.init_queryset"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.utils.evmore.EvMore.init_queryset"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">init_django_paginator</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">pages</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/utils/evmore.html#EvMore.init_django_paginator"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.utils.evmore.EvMore.init_django_paginator"title="Permalink to this definition">¶</a></dt>
<dd><p>The input is a django Paginator object.</p>
<codeclass="sig-name descname">init_iterable</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">inp</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/utils/evmore.html#EvMore.init_iterable"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.utils.evmore.EvMore.init_iterable"title="Permalink to this definition">¶</a></dt>
<dd><p>The input is something other than a string - convert to iterable of strings</p>
</dd></dl>
<dlclass="py method">
<dtid="evennia.utils.evmore.EvMore.init_f_str">
<codeclass="sig-name descname">init_f_str</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">text</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/utils/evmore.html#EvMore.init_f_str"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.utils.evmore.EvMore.init_f_str"title="Permalink to this definition">¶</a></dt>
<dd><p>The input contains \f (backslash + f) markers. We use \f to indicate
the user wants to enforce their line breaks on their own. If so, we do
no automatic line-breaking/justification at all.</p>
</dd></dl>
<dlclass="py method">
<dtid="evennia.utils.evmore.EvMore.init_str">
<codeclass="sig-name descname">init_str</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">text</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/utils/evmore.html#EvMore.init_str"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.utils.evmore.EvMore.init_str"title="Permalink to this definition">¶</a></dt>
<dd><p>The input is a string</p>
</dd></dl>
<dlclass="py method">
<dtid="evennia.utils.evmore.EvMore.init_pages">
<codeclass="sig-name descname">init_pages</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">inp</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/utils/evmore.html#EvMore.init_pages"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.utils.evmore.EvMore.init_pages"title="Permalink to this definition">¶</a></dt>
<dd><p>Initialize the pagination. By default, will analyze input type to determine
how pagination automatically.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><p><strong>inp</strong> (<em>any</em>) – Incoming data to be paginated. By default, handles pagination of
strings, querysets, django.Paginator, EvTables and any iterables with strings.</p>
</dd>
</dl>
<pclass="rubric">Notes</p>
<p>If overridden, this method must perform the following actions:</p>
<ulclass="simple">
<li><p>read and re-store <strong>self._data</strong> (the incoming data set) if needed
for pagination to work.</p></li>
<li><p>set <strong>self._npages</strong> to the total number of pages. Default is 1.</p></li>
<li><p>set <strong>self._paginator</strong> to a callable that will take a page number 1…N and return
the data to display on that page (not any decorations or next/prev buttons). If only
wanting to change the paginator, override <strong>self.paginator</strong> instead.</p></li>
<li><p>set <strong>self._page_formatter</strong> to a callable that will receive the
page from <strong>self._paginator</strong> and format it with one element per
line. Default is <strong>str</strong>. Or override <strong>self.page_formatter</strong>
directly instead.</p></li>
</ul>
<p>By default, helper methods are called that perform these actions
depending on supported inputs.</p>
</dd></dl>
<dlclass="py method">
<dtid="evennia.utils.evmore.EvMore.paginator">
<codeclass="sig-name descname">paginator</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">pageno</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/utils/evmore.html#EvMore.paginator"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.utils.evmore.EvMore.paginator"title="Permalink to this definition">¶</a></dt>
<dd><p>Paginator. The data operated upon is in <strong>self._data</strong>.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><p><strong>pageno</strong> (<em>int</em>) – The page number to view, from 0…N-1</p>
</dd>
<dtclass="field-even">Returns</dt>
<ddclass="field-even"><p><p><em>str</em>–</p>
<dlclass="simple">
<dt>The page to display (without any decorations, those are added</dt><dd><p>by EvMore).</p>
<codeclass="sig-name descname">page_formatter</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">page</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/utils/evmore.html#EvMore.page_formatter"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.utils.evmore.EvMore.page_formatter"title="Permalink to this definition">¶</a></dt>
<dd><p>Page formatter. Every page passes through this method. Override
it to customize behvaior 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>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><p><strong>page</strong> (<em>any</em>) – A piece of data representing one page to display. This must</p>
</dd>
<dtclass="field-even">Returns</dt>
<ddclass="field-even"><p><p><em>str</em>–</p>
<dlclass="simple">
<dt>A ready-formatted page to display. Extra footer with help about</dt><dd><p>switching to the next/prev page will be added automatically</p>
</dd>
</dl>
</p>
</dd>
</dl>
</dd></dl>
</dd></dl>
<dlclass="py function">
<dtid="evennia.utils.evmore.msg">
<codeclass="sig-prename descclassname">evennia.utils.evmore.</code><codeclass="sig-name descname">msg</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">caller</span></em>, <emclass="sig-param"><spanclass="n">text</span><spanclass="o">=</span><spanclass="default_value">''</span></em>, <emclass="sig-param"><spanclass="n">always_page</span><spanclass="o">=</span><spanclass="default_value">False</span></em>, <emclass="sig-param"><spanclass="n">session</span><spanclass="o">=</span><spanclass="default_value">None</span></em>, <emclass="sig-param"><spanclass="n">justify</span><spanclass="o">=</span><spanclass="default_value">False</span></em>, <emclass="sig-param"><spanclass="n">justify_kwargs</span><spanclass="o">=</span><spanclass="default_value">None</span></em>, <emclass="sig-param"><spanclass="n">exit_on_lastpage</span><spanclass="o">=</span><spanclass="default_value">True</span></em>, <emclass="sig-param"><spanclass="o">**</span><spanclass="n">kwargs</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/utils/evmore.html#msg"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.utils.evmore.msg"title="Permalink to this definition">¶</a></dt>
<dd><p>EvMore-supported version of msg, mimicking the normal msg method.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><ulclass="simple">
<li><p><strong>caller</strong> (<em>Object</em><em> or </em><em>Account</em>) – Entity reading the text.</p></li>
<li><p><strong>text</strong> (<em>str</em><em>, </em><aclass="reference internal"href="evennia.utils.evtable.html#evennia.utils.evtable.EvTable"title="evennia.utils.evtable.EvTable"><em>EvTable</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 \f (backslash + f) format symbol, automatic pagination is disabled
and page-breaks will only happen after each \f.</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>text</strong> is converted to an iterator, where each step is
is expected to be a line in the final display, and each line
will be run through repr().</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>text</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, justify long lines in output. Disable for
fixed-format output, like tables.</p></li>
<li><p><strong>justify_kwargs</strong> (<em>dict</em><em>, </em><em>bool</em><em> or </em><em>None</em><em>, </em><em>optional</em>) – If given, this should
be valid keyword arguments to the utils.justify() function. If False,
no justification will be done.</p></li>
<li><p><strong>exit_on_lastpage</strong> (<em>bool</em><em>, </em><em>optional</em>) – Immediately exit pager when reaching the last page.</p></li>
<li><p><strong>use_evtable</strong> (<em>bool</em><em>, </em><em>optional</em>) – If True, each page will be rendered as an
EvTable. For this to work, <strong>text</strong> must be an iterable, where each element
is the table (list of list) to render on that page.</p></li>
<li><p><strong>evtable_args</strong> (<em>tuple</em><em>, </em><em>optional</em>) – The args to use for EvTable on each page.</p></li>
<li><p><strong>evtable_kwargs</strong> (<em>dict</em><em>, </em><em>optional</em>) – The kwargs to use for EvTable on each
page (except <strong>table</strong>, which is supplied by EvMore per-page).</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.</p></li>