<spanid="evennia-commands-cmdparser"></span><h1>evennia.commands.cmdparser<aclass="headerlink"href="#module-evennia.commands.cmdparser"title="Link to this heading">¶</a></h1>
<spanclass="sig-prename descclassname"><spanclass="pre">evennia.commands.cmdparser.</span></span><spanclass="sig-name descname"><spanclass="pre">create_match</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">cmdname</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">string</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">cmdobj</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">raw_cmdname</span></span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/commands/cmdparser.html#create_match"><spanclass="viewcode-link"><spanclass="pre">[source]</span></span></a><aclass="headerlink"href="#evennia.commands.cmdparser.create_match"title="Link to this definition">¶</a></dt>
<dt>This is on the form (cmdname, args, cmdobj, cmdlen, mratio, raw_cmdname),</dt><dd><p>where <strong>cmdname</strong> is the command’s name and <strong>args</strong> is the rest of the incoming
string, without said command name. <strong>cmdobj</strong> is
the Command instance, the cmdlen is the same as len(cmdname) and mratio
is a measure of how big a part of the full input string the cmdname
takes up - an exact match would be 1.0. Finally, the <strong>raw_cmdname</strong> is
the cmdname unmodified by eventual prefix-stripping.</p>
<spanclass="sig-prename descclassname"><spanclass="pre">evennia.commands.cmdparser.</span></span><spanclass="sig-name descname"><spanclass="pre">build_matches</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">raw_string</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">cmdset</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">include_prefixes</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/commands/cmdparser.html#build_matches"><spanclass="viewcode-link"><spanclass="pre">[source]</span></span></a><aclass="headerlink"href="#evennia.commands.cmdparser.build_matches"title="Link to this definition">¶</a></dt>
<li><p><strong>cmdset</strong> (<aclass="reference internal"href="evennia.commands.cmdhandler.html#evennia.commands.cmdhandler.CmdSet"title="evennia.commands.cmdhandler.CmdSet"><em>CmdSet</em></a>) – The current cmdset to pick Commands from.</p></li>
<spanclass="sig-prename descclassname"><spanclass="pre">evennia.commands.cmdparser.</span></span><spanclass="sig-name descname"><spanclass="pre">try_num_differentiators</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">raw_string</span></span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/commands/cmdparser.html#try_num_differentiators"><spanclass="viewcode-link"><spanclass="pre">[source]</span></span></a><aclass="headerlink"href="#evennia.commands.cmdparser.try_num_differentiators"title="Link to this definition">¶</a></dt>
<spanclass="sig-prename descclassname"><spanclass="pre">evennia.commands.cmdparser.</span></span><spanclass="sig-name descname"><spanclass="pre">cmdparser</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">raw_string</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">cmdset</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">caller</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">match_index</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/commands/cmdparser.html#cmdparser"><spanclass="viewcode-link"><spanclass="pre">[source]</span></span></a><aclass="headerlink"href="#evennia.commands.cmdparser.cmdparser"title="Link to this definition">¶</a></dt>
<li><p><strong>cmdset</strong> (<aclass="reference internal"href="evennia.commands.cmdhandler.html#evennia.commands.cmdhandler.CmdSet"title="evennia.commands.cmdhandler.CmdSet"><em>CmdSet</em></a>) – The merged, currently valid cmdset</p></li>
<li><p><strong>caller</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>Account</em><em> or </em><em>Object</em>) – The caller triggering this parsing.</p></li>
<li><p><strong>match_index</strong> (<em>int</em><em>, </em><em>optional</em>) – Index to pick a given match in a
list of same-named command matches. If this is given, it suggests
this is not the first time this function was called: normally
the first run resulted in a multimatch, and the index is given
to select between the results for the second run.</p></li>