Sophie

Sophie

distrib > Mageia > 4 > x86_64 > by-pkgid > c3732731228538f6126cae930c10ad71 > files > 185

python-pyro4-4.21-3.mga4.noarch.rpm



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>Command line tools &mdash; Pyro 4.21 documentation</title>
    
    <link rel="stylesheet" href="_static/default.css" type="text/css" />
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '',
        VERSION:     '4.21',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="_static/jquery.js"></script>
    <script type="text/javascript" src="_static/underscore.js"></script>
    <script type="text/javascript" src="_static/doctools.js"></script>
    <link rel="top" title="Pyro 4.21 documentation" href="index.html" />
    <link rel="next" title="Clients: Calling remote objects" href="clientcode.html" />
    <link rel="prev" title="Tutorial" href="tutorials.html" /> 
  </head>
  <body>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="clientcode.html" title="Clients: Calling remote objects"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="tutorials.html" title="Tutorial"
             accesskey="P">previous</a> |</li>
        <li><a href="index.html">Pyro 4.21 documentation</a> &raquo;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="command-line-tools">
<span id="command-line"></span><h1>Command line tools<a class="headerlink" href="#command-line-tools" title="Permalink to this headline">¶</a></h1>
<p>Pyro has several command line tools that you will be using sooner or later.</p>
<p>For now, there are no special scripts or executables that call those tools directly.
Instead, they&#8217;re &#8220;executable modules&#8221; inside Pyro. They&#8217;re invoked with Python&#8217;s &#8220;-m&#8221;
command line argument.</p>
<p>An idea is to define shell aliases for them, for instance:
<tt class="kbd docutils literal"><span class="pre">alias</span> <span class="pre">pyrons='python</span> <span class="pre">-m</span> <span class="pre">Pyro4.naming'</span></tt></p>
<div class="section" id="name-server">
<h2>Name server<a class="headerlink" href="#name-server" title="Permalink to this headline">¶</a></h2>
<p>synopsys: <strong class="command">python -m Pyro4.naming [options]</strong></p>
<p>Starts the Pyro Name Server. It can run without any arguments but there are several that you
can use, for instance to control the hostname and port that the server is listening on.
A short explanation of the available options can be printed with the help option:</p>
<dl class="option">
<dt id="cmdoption-Pyro4.naming-h">
<tt class="descname">-h</tt><tt class="descclassname"></tt><tt class="descclassname">, </tt><tt class="descname">--help</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-Pyro4.naming-h" title="Permalink to this definition">¶</a></dt>
<dd><p>Print a short help message and exit.</p>
</dd></dl>

<div class="admonition-see-also admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last"><a class="reference internal" href="nameserver.html#nameserver-nameserver"><em>Starting the Name Server</em></a> for detailed information</p>
</div>
</div>
<div class="section" id="name-server-control">
<h2>Name server control<a class="headerlink" href="#name-server-control" title="Permalink to this headline">¶</a></h2>
<p>synopsys: <strong class="command">python -m Pyro4.nsc [options] command [arguments]</strong></p>
<p>The name server control tool (or &#8216;nsc&#8217;) is used to talk to a running name server and perform
diagnostic or maintenance actions such as querying the registered objects, adding or removing
a name registration manually, etc.
A short explanation of the available options can be printed with the help option:</p>
<dl class="option">
<dt id="cmdoption-Pyro4.nsc-h">
<tt class="descname">-h</tt><tt class="descclassname"></tt><tt class="descclassname">, </tt><tt class="descname">--help</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-Pyro4.nsc-h" title="Permalink to this definition">¶</a></dt>
<dd><p>Print a short help message and exit.</p>
</dd></dl>

<div class="admonition-see-also admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last"><a class="reference internal" href="nameserver.html#nameserver-nsc"><em>Name server control tool</em></a> for detailed information</p>
</div>
</div>
<div class="section" id="test-echo-server">
<span id="command-line-echoserver"></span><h2>Test echo server<a class="headerlink" href="#test-echo-server" title="Permalink to this headline">¶</a></h2>
<p><strong class="command">python -m Pyro4.test.echoserver [options]</strong></p>
<p>This is a simple built-in server that can be used for testing purposes.
It launches a Pyro object that has several methods suitable for various tests (see below).
Optionally it can also directly launch a name server. This way you can get a simple
Pyro server plus name server up with just a few keystrokes.</p>
<p>A short explanation of the available options can be printed with the help option:</p>
<dl class="option">
<dt id="cmdoption-Pyro4.test.echoserver-h">
<tt class="descname">-h</tt><tt class="descclassname"></tt><tt class="descclassname">, </tt><tt class="descname">--help</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-Pyro4.test.echoserver-h" title="Permalink to this definition">¶</a></dt>
<dd><p>Print a short help message and exit.</p>
</dd></dl>

<p>The echo server object is available by the name <tt class="docutils literal"><span class="pre">test.echoserver</span></tt>. It exposes the following methods:</p>
<dl class="method">
<dt id="echo">
<tt class="descname">echo</tt><big>(</big><em>argument</em><big>)</big><a class="headerlink" href="#echo" title="Permalink to this definition">¶</a></dt>
<dd><p>Simply returns the given argument object again.</p>
</dd></dl>

<dl class="method">
<dt id="error">
<tt class="descname">error</tt><big>(</big><big>)</big><a class="headerlink" href="#error" title="Permalink to this definition">¶</a></dt>
<dd><p>Generates a run time exception.</p>
</dd></dl>

<dl class="method">
<dt id="shutdown">
<tt class="descname">shutdown</tt><big>(</big><big>)</big><a class="headerlink" href="#shutdown" title="Permalink to this definition">¶</a></dt>
<dd><p>Terminates the echo server.</p>
</dd></dl>

</div>
<div class="section" id="configuration-check">
<h2>Configuration check<a class="headerlink" href="#configuration-check" title="Permalink to this headline">¶</a></h2>
<p><strong class="command">python -m Pyro4.configuration</strong>
This is the equivalent of:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="kn">import</span> <span class="nn">Pyro4</span>
<span class="gp">&gt;&gt;&gt; </span><span class="k">print</span> <span class="n">Pyro4</span><span class="o">.</span><span class="n">config</span><span class="o">.</span><span class="n">dump</span><span class="p">()</span>
</pre></div>
</div>
<p>It prints the Pyro version, the location it is imported from, and a dump of the active configuration items.</p>
</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
            <p class="logo"><a href="index.html">
              <img class="logo" src="_static/pyro.png" alt="Logo"/>
            </a></p>
  <h3><a href="index.html">Table Of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">Command line tools</a><ul>
<li><a class="reference internal" href="#name-server">Name server</a></li>
<li><a class="reference internal" href="#name-server-control">Name server control</a></li>
<li><a class="reference internal" href="#test-echo-server">Test echo server</a></li>
<li><a class="reference internal" href="#configuration-check">Configuration check</a></li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="tutorials.html"
                        title="previous chapter">Tutorial</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="clientcode.html"
                        title="next chapter">Clients: Calling remote objects</a></p>
<div id="searchbox" style="display: none">
  <h3>Quick search</h3>
    <form class="search" action="search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    <p class="searchtip" style="font-size: 90%">
    Enter search terms or a module, class or function name.
    </p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="clientcode.html" title="Clients: Calling remote objects"
             >next</a> |</li>
        <li class="right" >
          <a href="tutorials.html" title="Tutorial"
             >previous</a> |</li>
        <li><a href="index.html">Pyro 4.21 documentation</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
        &copy; Copyright Irmen de Jong.
      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
    </div>
  </body>
</html>