Home | Trees | Indices | Help |
|
---|
|
>>> from twisted.internet.protocol import ReconnectingClientFactory >>> from twisted.internet import reactor >>> from pyfics.protocols import InteractiveIcsParsingProtocol >>> from pyfics.parser import ficsparser >>> from pyfics.server import fics >>> ics = fics.Fics() >>> ics.login = 'username' >>> ics.password = 'password' >>> >>> class MyProtocol(InteractiveIcsParsingProtocol): ... delimiters = [ 'fics% ', ] ... server = ics ... parser = ficsparser ... ... def datagramReceived(self, data): ... print repr(data) ... >>> c = ReconnectingClientFactory >>> c.protocol = MyProtocol >>> >>> reactor.connectTCP('freechess.org', 5000, c()) >>> reactor.run()
Version: 0.1
Author: Ali Polatel <polatel@gmail.com>
Copyright: Copyright (c) 2006-2007 Ali Polatel
License: GPL-3
|
|||
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0beta1 on Mon Nov 26 04:19:52 2007 |