This file is indexed.

/usr/share/doc/pyro4-doc/html/pyrolite.html is in pyro4-doc 4.23-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
<!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>Pyrolite - client library for Java and .NET &mdash; Pyro 4.23 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.23',
        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.23 documentation" href="index.html" />
    <link rel="next" title="Change Log" href="changelog.html" />
    <link rel="prev" title="Running on alternative Python implementations" href="alternative.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="changelog.html" title="Change Log"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="alternative.html" title="Running on alternative Python implementations"
             accesskey="P">previous</a> |</li>
        <li><a href="index.html">Pyro 4.23 documentation</a> &raquo;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="pyrolite-client-library-for-java-and-net">
<h1>Pyrolite - client library for Java and .NET<a class="headerlink" href="#pyrolite-client-library-for-java-and-net" title="Permalink to this headline">ΒΆ</a></h1>
<p>This library allows your Java or .NET program to interface very easily with
the Python world. It uses the Pyro protocol to call methods on remote
objects. It also supports convenient access to a Pyro Flame server including the remote
interactive console.</p>
<p>Pyrolite is a tiny library (~60Kb) that implements a part of the client side Pyro library,
hence its name &#8216;lite&#8217;.  Because Pyrolite has no dependencies,
it is a much lighter way to use Pyro from Java/.NET than a solution with
jython+pyro or IronPython+pyro would provide.
So if you don&#8217;t need Pyro&#8217;s full feature set, and don&#8217;t require your
Java/.NET code to host Pyro objects itself, Pyrolite may be
a good choice to connect java or .NET and python.</p>
<p>Pyrolite contains a feature complete implementation of Python&#8217;s <tt class="xref py py-mod docutils literal"><span class="pre">pickle</span></tt> protocol
(with fairly intelligent mapping of datatypes between Python and Java/.NET),
and a small part of Pyro&#8217;s client network protocol and proxy logic. It can also use
the Serpent serialization format.</p>
<p>Get it from here: <a class="reference external" href="http://irmen.home.xs4all.nl/pyrolite/">http://irmen.home.xs4all.nl/pyrolite/</a></p>
<p>Readme: <a class="reference external" href="http://irmen.home.xs4all.nl/pyrolite/README.txt">http://irmen.home.xs4all.nl/pyrolite/README.txt</a></p>
<p>License (same as Pyro): <a class="reference external" href="http://irmen.home.xs4all.nl/pyrolite/LICENSE">http://irmen.home.xs4all.nl/pyrolite/LICENSE</a></p>
<p>Source is on Github: <a class="reference external" href="https://github.com/irmen/Pyrolite">https://github.com/irmen/Pyrolite</a></p>
<p>Small code example in Java:</p>
<div class="highlight-java"><div class="highlight"><pre><span class="kn">import</span> <span class="nn">net.razorvine.pyro.*</span><span class="o">;</span>

<span class="n">NameServerProxy</span> <span class="n">ns</span> <span class="o">=</span> <span class="n">NameServerProxy</span><span class="o">.</span><span class="na">locateNS</span><span class="o">(</span><span class="kc">null</span><span class="o">);</span>
<span class="n">PyroProxy</span> <span class="n">remoteobject</span> <span class="o">=</span> <span class="k">new</span> <span class="n">PyroProxy</span><span class="o">(</span><span class="n">ns</span><span class="o">.</span><span class="na">lookup</span><span class="o">(</span><span class="s">&quot;Your.Pyro.Object&quot;</span><span class="o">));</span>
<span class="n">Object</span> <span class="n">result</span> <span class="o">=</span> <span class="n">remoteobject</span><span class="o">.</span><span class="na">call</span><span class="o">(</span><span class="s">&quot;pythonmethod&quot;</span><span class="o">,</span> <span class="mi">42</span><span class="o">,</span> <span class="s">&quot;hello&quot;</span><span class="o">,</span> <span class="k">new</span> <span class="kt">int</span><span class="o">[]{</span><span class="mi">1</span><span class="o">,</span><span class="mi">2</span><span class="o">,</span><span class="mi">3</span><span class="o">});</span>
<span class="n">String</span> <span class="n">message</span> <span class="o">=</span> <span class="o">(</span><span class="n">String</span><span class="o">)</span><span class="n">result</span><span class="o">;</span>  <span class="c1">// cast to the type that &#39;pythonmethod&#39; returns</span>
<span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="s">&quot;result message=&quot;</span><span class="o">+</span><span class="n">message</span><span class="o">);</span>
<span class="n">remoteobject</span><span class="o">.</span><span class="na">close</span><span class="o">();</span>
<span class="n">ns</span><span class="o">.</span><span class="na">close</span><span class="o">();</span>
</pre></div>
</div>
<p>The same example in C#:</p>
<div class="highlight-csharp"><div class="highlight"><pre><span class="k">using</span> <span class="nn">Razorvine.Pyro</span><span class="p">;</span>

<span class="n">using</span><span class="p">(</span> <span class="n">NameServerProxy</span> <span class="n">ns</span> <span class="p">=</span> <span class="n">NameServerProxy</span><span class="p">.</span><span class="n">locateNS</span><span class="p">(</span><span class="k">null</span><span class="p">)</span> <span class="p">)</span>
<span class="p">{</span>
    <span class="n">using</span><span class="p">(</span> <span class="n">PyroProxy</span> <span class="n">something</span> <span class="p">=</span> <span class="k">new</span> <span class="n">PyroProxy</span><span class="p">(</span><span class="n">ns</span><span class="p">.</span><span class="n">lookup</span><span class="p">(</span><span class="s">&quot;Your.Pyro.Object&quot;</span><span class="p">))</span> <span class="p">)</span>
    <span class="p">{</span>
        <span class="kt">object</span> <span class="n">result</span> <span class="p">=</span> <span class="n">something</span><span class="p">.</span><span class="n">call</span><span class="p">(</span><span class="s">&quot;pythonmethod&quot;</span><span class="p">,</span> <span class="m">42</span><span class="p">,</span> <span class="s">&quot;hello&quot;</span><span class="p">,</span> <span class="k">new</span> <span class="kt">int</span><span class="p">[]{</span><span class="m">1</span><span class="p">,</span><span class="m">2</span><span class="p">,</span><span class="m">3</span><span class="p">});</span>
        <span class="kt">string</span> <span class="n">message</span> <span class="p">=</span> <span class="p">(</span><span class="kt">string</span><span class="p">)</span><span class="n">result</span><span class="p">;</span>  <span class="c1">// cast to the type that &#39;pythonmethod&#39; returns</span>
        <span class="n">Console</span><span class="p">.</span><span class="n">WriteLine</span><span class="p">(</span><span class="s">&quot;result message=&quot;</span><span class="p">+</span><span class="n">message</span><span class="p">);</span>
    <span class="p">}</span>
<span class="p">}</span>
</pre></div>
</div>
<p>You can also use Pyro Flame rather conveniently because of some wrapper classes:</p>
<div class="highlight-java"><div class="highlight"><pre><span class="n">Config</span><span class="o">.</span><span class="na">SERIALIZER</span> <span class="o">=</span> <span class="n">Config</span><span class="o">.</span><span class="na">SerializerType</span><span class="o">.</span><span class="na">pickle</span><span class="o">;</span>   <span class="c1">// flame requires the pickle serializer</span>
<span class="n">PyroProxy</span> <span class="n">flame</span> <span class="o">=</span> <span class="k">new</span> <span class="n">PyroProxy</span><span class="o">(</span><span class="n">hostname</span><span class="o">,</span> <span class="n">port</span><span class="o">,</span> <span class="s">&quot;Pyro.Flame&quot;</span><span class="o">);</span>
<span class="n">FlameModule</span> <span class="n">r_module</span> <span class="o">=</span> <span class="o">(</span><span class="n">FlameModule</span><span class="o">)</span> <span class="n">flame</span><span class="o">.</span><span class="na">call</span><span class="o">(</span><span class="s">&quot;module&quot;</span><span class="o">,</span> <span class="s">&quot;socket&quot;</span><span class="o">);</span>
<span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="s">&quot;hostname=&quot;</span> <span class="o">+</span> <span class="n">r_module</span><span class="o">.</span><span class="na">call</span><span class="o">(</span><span class="s">&quot;gethostname&quot;</span><span class="o">));</span>

<span class="n">FlameRemoteConsole</span> <span class="n">console</span> <span class="o">=</span> <span class="o">(</span><span class="n">FlameRemoteConsole</span><span class="o">)</span> <span class="n">flame</span><span class="o">.</span><span class="na">call</span><span class="o">(</span><span class="s">&quot;console&quot;</span><span class="o">);</span>
<span class="n">console</span><span class="o">.</span><span class="na">interact</span><span class="o">();</span>
<span class="n">console</span><span class="o">.</span><span class="na">close</span><span class="o">();</span>
</pre></div>
</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>
  <h4>Previous topic</h4>
  <p class="topless"><a href="alternative.html"
                        title="previous chapter">Running on alternative Python implementations</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="changelog.html"
                        title="next chapter">Change Log</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="changelog.html" title="Change Log"
             >next</a> |</li>
        <li class="right" >
          <a href="alternative.html" title="Running on alternative Python implementations"
             >previous</a> |</li>
        <li><a href="index.html">Pyro 4.23 documentation</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
        &copy; Copyright Irmen de Jong.
      Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.1.
    </div>
  </body>
</html>