<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>The <strong>always_page</strong> argument decides if the pager is used also if the text is not long
enough to need to scroll, <strong>session</strong> is used to determine which session to relay
to and <strong>justify_kwargs</strong> are kwargs to pass to utils.utils.justify 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>
<codeclass="sig-name descname">search_index_entry</code><emclass="property"> = {'aliases': 'b next q abort end quit back e t top n a', 'category': 'general', 'key': '__noinput_command', 'tags': '', 'text': '\n Manipulate the text paging\n '}</em><aclass="headerlink"href="#evennia.utils.evmore.CmdMore.search_index_entry"title="Permalink to this definition">¶</a></dt>
<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>
<codeclass="sig-name descname">search_index_entry</code><emclass="property"> = {'aliases': 'l', 'category': 'general', 'key': 'look', 'tags': '', 'text': '\n Override look to display window and prevent OOCLook from firing\n '}</em><aclass="headerlink"href="#evennia.utils.evmore.CmdMoreLook.search_index_entry"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">text</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">text</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>EvMore pager</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, paginate normally. If this text contains one or more <strong>\f</strong> format
symbols, 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>text</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>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, auto-justify long lines. This must be turned
off for fixed-width or formatted output, like tables. It’s force-disabled
if <strong>text</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>page_formatter</strong> (<em>callable</em><em>, </em><em>optional</em>) – If given, this function will be passed the
contents of each extracted page. This is useful when paginating
data consisting something other than a string or a list of strings. Especially
queryset data is likely to always need this argument specified. Note however,
that all size calculations assume this function to return one single line
per element on the 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>
<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="n">EvMore</span><spanclass="p">(</span><spanclass="n">caller</span><spanclass="p">,</span><spanclass="n">pages</span><spanclass="p">)</span><spanclass="c1"># will repr() each object per line, 10 to a page</span>
<codeclass="sig-name descname">format_page</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.format_page"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.utils.evmore.EvMore.format_page"title="Permalink to this definition">¶</a></dt>
<dd><p>Page formatter. Uses the page_formatter callable by default.
This allows to easier override the class if needed.</p>
<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>
</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_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 <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
line-breaking/justification at all.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><p><strong>text</strong> (<em>str</em>) – The string to format with f-markers.</p>
</dd>
</dl>
</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.display">
<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>
<dd><p>Starts the pagination</p>
</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><blockquote>
<div><p>EvMore-supported version of msg, mimicking the normal msg method.</p>
</div></blockquote>
<p>EvMore pager</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, paginate normally. If this text contains one or more <strong>\f</strong> format
symbols, 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>text</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>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, auto-justify long lines. This must be turned
off for fixed-width or formatted output, like tables. It’s force-disabled
if <strong>text</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>page_formatter</strong> (<em>callable</em><em>, </em><em>optional</em>) – If given, this function will be passed the
contents of each extracted page. This is useful when paginating
data consisting something other than a string or a list of strings. Especially
queryset data is likely to always need this argument specified. Note however,
that all size calculations assume this function to return one single line
per element on the 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>
<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="n">EvMore</span><spanclass="p">(</span><spanclass="n">caller</span><spanclass="p">,</span><spanclass="n">pages</span><spanclass="p">)</span><spanclass="c1"># will repr() each object per line, 10 to a page</span>