Pyro4.utils.flame — Foreign Location Automatic Module Exposer

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.

Pyro4.utils.flame.connect(location, hmac_key=None)

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.


Create and register a Flame server in the given daemon. Be very cautious before starting this: it allows the clients full access to everything on your system.

Pyro4.utils.flame.createModule(name, source, filename='<dynamic-module>', namespace=None)

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 globals()), it will import the module into that namespace too.

class Pyro4.utils.flame.Flame

The actual FLAME server logic. Usually created by using core.Daemon.startFlame(). Be very cautious before starting this: it allows the clients full access to everything on your system.


returns a proxy to the given builtin on the server


get a proxy for a remote interactive console session


evaluate an expression and return its result


execute a piece of code


read any accessible file from the server


obtain the source code from a module on the server


Import a module on the server given by the module name and returns a proxy to it. The returned proxy does not support direct attribute access, if you want that, you should use the evaluate method instead.

sendfile(filename, filedata)

store a new file on the server

sendmodule(modulename, modulesource)

Send the source of a module to the server and make the server load it. Note that you still have to actually import it on the server to access it. Sending a module again will replace the previous one with the new.