source: protocols/python/examples/sampleplugin.py @ 76ca5cb

Last change on this file since 76ca5cb was 76ca5cb, checked in by Nick Murdoch <nick@…>, at 2013-03-27T20:31:46Z

bpython.register_protocl() actually takes meaningful args and does something.

  • Property mode set to 100644
File size: 464 bytes
Line 
1"""sampleplugin.py - sample plugin for bitlbee-python.
2
3Place this file in bitlbee's plugin directory. bitlbee-python
4will pick it up as long as it has a .py extension.
5"""
6
7import sys
8import bpython
9print ("hello, I'm a test plugin running on Python {}.{}.{}".format(
10    sys.version_info.major, sys.version_info.minor, sys.version_info.micro))
11
12class MyProtocol(bpython.Protocol):
13    pass
14
15myproto = MyProtocol()
16
17bpython.register_protocol('myproto', myproto)
18
Note: See TracBrowser for help on using the repository browser.