On-demand function sharing
<p>I need to convert from strings to the code named references. The only currently known option is a script that makes a script, and I was thinking it could be inline like <code>exec</code>.</p>

<pre><code>class finder:
  def __init__(self, parent):
    self.parent = parent
  def isin(self, what):
    return what in self.parent
  def find(self, what):
    if self.isin(what): return self.parent.__dict__[what.__name__]
    else: return __import__("pull").__dict__["downloader"](self.parent.hosts).download(what)
  def put(self, what):
    f = self.find(what)
    self.parent.__dict__[f.__name__] = f

from sock import Socket
from unpack import unpacker
</code></pre>

<p>...</p>

<pre><code>class downloader:
  def __init__(self, hosts):
    self.hosts = hosts
  def download(name):
    for host in hosts:
      pack = unpacker()
      s = Socket(host[0], host[1])
      s.send("get " + name)
      f = pack.unpack(s)
      if f is not None: return f
</code></pre>
