<!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>Pyro4.utils.flame — Foreign Location Automatic Module Exposer — 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="up" title="Pyro4 library API" href="../api.html" /> <link rel="next" title="Pyro4.futures — asynchronous calls" href="futures.html" /> <link rel="prev" title="Pyro4.test.echoserver — Built-in echo server for testing purposes" href="echoserver.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="futures.html" title="Pyro4.futures — asynchronous calls" accesskey="N">next</a> |</li> <li class="right" > <a href="echoserver.html" title="Pyro4.test.echoserver — Built-in echo server for testing purposes" accesskey="P">previous</a> |</li> <li><a href="../index.html">Pyro 4.21 documentation</a> »</li> <li><a href="../api.html" accesskey="U">Pyro4 library API</a> »</li> </ul> </div> <div class="document"> <div class="documentwrapper"> <div class="bodywrapper"> <div class="body"> <div class="section" id="module-Pyro4.utils.flame"> <span id="pyro4-utils-flame-foreign-location-automatic-module-exposer"></span><h1><a class="reference internal" href="#module-Pyro4.utils.flame" title="Pyro4.utils.flame"><tt class="xref py py-mod docutils literal"><span class="pre">Pyro4.utils.flame</span></tt></a> — Foreign Location Automatic Module Exposer<a class="headerlink" href="#module-Pyro4.utils.flame" title="Permalink to this headline">¶</a></h1> <p>Pyro FLAME: Foreign Location Automatic Module Exposer. Easy but potentially very dangerous way of exposing remote modules and builtins. Flame requires the pickle serializer to be used.</p> <dl class="function"> <dt id="Pyro4.utils.flame.connect"> <tt class="descclassname">Pyro4.utils.flame.</tt><tt class="descname">connect</tt><big>(</big><em>location</em><big>)</big><a class="headerlink" href="#Pyro4.utils.flame.connect" title="Permalink to this definition">¶</a></dt> <dd><p>Connect to a Flame server on the given location, for instance localhost:9999 or ./u:unixsock This is just a convenience function to creates an appropriate Pyro proxy.</p> </dd></dl> <dl class="function"> <dt id="Pyro4.utils.flame.start"> <tt class="descclassname">Pyro4.utils.flame.</tt><tt class="descname">start</tt><big>(</big><em>daemon</em><big>)</big><a class="headerlink" href="#Pyro4.utils.flame.start" title="Permalink to this definition">¶</a></dt> <dd><p>Create and register a Flame server in the given daemon. Be <em>very</em> cautious before starting this: it allows the clients full access to everything on your system.</p> </dd></dl> <dl class="function"> <dt id="Pyro4.utils.flame.createModule"> <tt class="descclassname">Pyro4.utils.flame.</tt><tt class="descname">createModule</tt><big>(</big><em>name</em>, <em>source</em>, <em>filename='<dynamic-module>'</em>, <em>namespace=None</em><big>)</big><a class="headerlink" href="#Pyro4.utils.flame.createModule" title="Permalink to this definition">¶</a></dt> <dd><p>Utility function to create a new module with the given name (dotted notation allowed), directly from the source string. Adds it to sys.modules, and returns the new module object. If you provide a namespace dict (such as <tt class="docutils literal"><span class="pre">globals()</span></tt>), it will import the module into that namespace too.</p> </dd></dl> <dl class="class"> <dt id="Pyro4.utils.flame.Flame"> <em class="property">class </em><tt class="descclassname">Pyro4.utils.flame.</tt><tt class="descname">Flame</tt><a class="headerlink" href="#Pyro4.utils.flame.Flame" title="Permalink to this definition">¶</a></dt> <dd><p>The actual FLAME server logic. Usually created by using <tt class="xref py py-meth docutils literal"><span class="pre">Pyro4.core.Daemon.startFlame()</span></tt>. Be <em>very</em> cautious before starting this: it allows the clients full access to everything on your system.</p> <dl class="method"> <dt id="Pyro4.utils.flame.Flame.builtin"> <tt class="descname">builtin</tt><big>(</big><em>name</em><big>)</big><a class="headerlink" href="#Pyro4.utils.flame.Flame.builtin" title="Permalink to this definition">¶</a></dt> <dd><p>returns a proxy to the given builtin on the server</p> </dd></dl> <dl class="method"> <dt id="Pyro4.utils.flame.Flame.console"> <tt class="descname">console</tt><big>(</big><big>)</big><a class="headerlink" href="#Pyro4.utils.flame.Flame.console" title="Permalink to this definition">¶</a></dt> <dd><p>get a proxy for a remote interactive console session</p> </dd></dl> <dl class="method"> <dt id="Pyro4.utils.flame.Flame.evaluate"> <tt class="descname">evaluate</tt><big>(</big><em>expression</em><big>)</big><a class="headerlink" href="#Pyro4.utils.flame.Flame.evaluate" title="Permalink to this definition">¶</a></dt> <dd><p>evaluate an expression and return its result</p> </dd></dl> <dl class="method"> <dt id="Pyro4.utils.flame.Flame.execute"> <tt class="descname">execute</tt><big>(</big><em>code</em><big>)</big><a class="headerlink" href="#Pyro4.utils.flame.Flame.execute" title="Permalink to this definition">¶</a></dt> <dd><p>execute a piece of code</p> </dd></dl> <dl class="method"> <dt id="Pyro4.utils.flame.Flame.getfile"> <tt class="descname">getfile</tt><big>(</big><em>filename</em><big>)</big><a class="headerlink" href="#Pyro4.utils.flame.Flame.getfile" title="Permalink to this definition">¶</a></dt> <dd><p>read any accessible file from the server</p> </dd></dl> <dl class="method"> <dt id="Pyro4.utils.flame.Flame.getmodule"> <tt class="descname">getmodule</tt><big>(</big><em>modulename</em><big>)</big><a class="headerlink" href="#Pyro4.utils.flame.Flame.getmodule" title="Permalink to this definition">¶</a></dt> <dd><p>obtain the source code from a module on the server</p> </dd></dl> <dl class="method"> <dt id="Pyro4.utils.flame.Flame.module"> <tt class="descname">module</tt><big>(</big><em>name</em><big>)</big><a class="headerlink" href="#Pyro4.utils.flame.Flame.module" title="Permalink to this definition">¶</a></dt> <dd><p>import a module on the server given by the module name and returns a proxy to it</p> </dd></dl> <dl class="method"> <dt id="Pyro4.utils.flame.Flame.sendfile"> <tt class="descname">sendfile</tt><big>(</big><em>filename</em>, <em>filedata</em><big>)</big><a class="headerlink" href="#Pyro4.utils.flame.Flame.sendfile" title="Permalink to this definition">¶</a></dt> <dd><p>store a new file on the server</p> </dd></dl> <dl class="method"> <dt id="Pyro4.utils.flame.Flame.sendmodule"> <tt class="descname">sendmodule</tt><big>(</big><em>modulename</em>, <em>modulesource</em><big>)</big><a class="headerlink" href="#Pyro4.utils.flame.Flame.sendmodule" title="Permalink to this definition">¶</a></dt> <dd><p>Send the source of a module to the server and make the server load it. Note that you still have to actually <tt class="docutils literal"><span class="pre">import</span></tt> it on the server to access it. Sending a module again will replace the previous one with the new.</p> </dd></dl> </dd></dl> </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="echoserver.html" title="previous chapter"><tt class="docutils literal"><span class="pre">Pyro4.test.echoserver</span></tt> — Built-in echo server for testing purposes</a></p> <h4>Next topic</h4> <p class="topless"><a href="futures.html" title="next chapter"><tt class="docutils literal"><span class="pre">Pyro4.futures</span></tt> — asynchronous calls</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="futures.html" title="Pyro4.futures — asynchronous calls" >next</a> |</li> <li class="right" > <a href="echoserver.html" title="Pyro4.test.echoserver — Built-in echo server for testing purposes" >previous</a> |</li> <li><a href="../index.html">Pyro 4.21 documentation</a> »</li> <li><a href="../api.html" >Pyro4 library API</a> »</li> </ul> </div> <div class="footer"> © Copyright Irmen de Jong. Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3. </div> </body> </html>