1. Stephen Thorne
  2. harpoon

Overview

G'day,

This is a quick fast rapid prototyping tool for writing twisted code. This is a quick example.

Install harpoon:

$ python setup.py install

$ harpoon mymodule MyProtocol tcp:9000

Open a web browser at http://localhost:8080/

Create mymodule.py in the current directory.

Put this trivial echo server in it:

from twisted.internet import protocol

class MyProtocol(protocol.Protocol):
def dataReceived(self, data):
self.transport.write(data)

Click on [Reload] in the web page.

Telnet to localhost 9000, observe it working.

Do something silly like:

self.transport.write(data.encode('rot13'))

Click on [Reload] in the web page.

telnet to localhost 9000, observe that it's automatically reloaded your code.

Put a typo in your code, click reload, observe the huge traceback.