Usage

There are three styles of Whisker client available. Full worked examples are provided, along with a rationale for their use; see Rationale. The outlines, however, look like these:

Twisted client (preferred for simple interfaces)

from twisted.internet import reactor
from whisker.twistedclient import WhiskerTwistedTask

class MyWhiskerTask(WhiskerTwistedTask):
    # ...

w = MyWhiskerTask()
w.connect(...)
reactor.run()

Qt client (preferred for GUI use)

More complex; see the Starfeeder project example.

Raw socket client (deprecated)

from whisker.rawsocketclient import WhiskerRawSocketClient

w = WhiskerRawSocketClient()
w.connect_both_ports(...)
# ...
for line in w.getlines_mainsocket():
    # ...