<pre><code class="section">I am working on an example from <a href="http://www-128.ibm.com/developerworks/cn/linux/network/l-twist/part1/index.html">here</a><br><br>from twisted.internet.app import Application<br>from twisted.internet.protocol
 import Protocol, Factory<br><br>class Fibonacci(Protocol):<br>    &quot;&quot;&quot;Serve a sequence of Fibonacci numbers to all requesters&quot;&quot;&quot;<br><br>def dataReceived(self, data):<br>        self.factory.new
 = self.factory.a + self.factory.b<br>        self.transport.write(&#39;%d&#39; % self.factory.new)<br>        self.factory.a = self.factory.b<br>        self.factory.b = self.factory.new<br><br>def main():<br>    import fib_server    # Use script as namespace
<br>    f = Factory()<br>    f.protocol = fib_server.Fibonacci<br>    f.a, f.b = 1, 1<br>    application = Application(&quot;Fibonacci&quot;)<br>    application.listenTCP(8888, f)<br>    application.save()<br><br>if&#39;__main__&#39; == __name__:
<br>    main()<span style="font-family: arial,sans-serif;"><br><br>I have questions as the following:<br></span></code></pre>
<ol>
  <li><code class="section"><span style="font-family: arial,sans-serif;">I could not find where in the code above make a .tap file?</span></code></li>
  <li><code class="section"><span style="font-family: arial,sans-serif;">testing
on &quot;twistd -f Fibonacci.tap&quot; got message &quot;Failed to load application:
No module named fib_server&quot;.Can we use script as namespace?</span></code></li>
  <li><span style="font-family: arial,sans-serif;"><br>
    </span></li>
</ol>
Steve Han