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
|
Rev | Line | |
---|
[e38c6d8] | 1 | """sampleplugin.py - sample plugin for bitlbee-python. |
---|
| 2 | |
---|
| 3 | Place this file in bitlbee's plugin directory. bitlbee-python |
---|
| 4 | will pick it up as long as it has a .py extension. |
---|
| 5 | """ |
---|
| 6 | |
---|
| 7 | import sys |
---|
[93302ef] | 8 | import bpython |
---|
[76ca5cb] | 9 | print ("hello, I'm a test plugin running on Python {}.{}.{}".format( |
---|
| 10 | sys.version_info.major, sys.version_info.minor, sys.version_info.micro)) |
---|
[e38c6d8] | 11 | |
---|
[76ca5cb] | 12 | class MyProtocol(bpython.Protocol): |
---|
| 13 | pass |
---|
[26f3b5f] | 14 | |
---|
| 15 | myproto = MyProtocol() |
---|
| 16 | |
---|
[76ca5cb] | 17 | bpython.register_protocol('myproto', myproto) |
---|
| 18 | |
---|
Note: See
TracBrowser
for help on using the repository browser.