Last change
on this file since 26f3b5f was
26f3b5f,
checked in by Nick Murdoch <nick@…>, at 2013-03-19T19:58:17Z
|
Create a shell Protocol class for the module.
Can't currently do much with it, including even subclassing.
|
-
Property mode set to
100644
|
File size:
564 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 |
---|
[e38c6d8] | 9 | print "hello, I'm a test plugin running on Python", sys.version_info |
---|
| 10 | |
---|
[26f3b5f] | 11 | print bpython.ProtocolPlugin |
---|
| 12 | print bpython.ProtocolPlugin() |
---|
[93302ef] | 13 | print bpython.register_protocol |
---|
| 14 | |
---|
[26f3b5f] | 15 | try: |
---|
| 16 | class MyProtocol(bpython.ProtocolPlugin): |
---|
| 17 | pass |
---|
| 18 | except Exception, e: |
---|
| 19 | print "error:", e |
---|
| 20 | |
---|
| 21 | myproto = MyProtocol() |
---|
| 22 | print "myproto: ", myproto |
---|
| 23 | |
---|
[93302ef] | 24 | bpython.register_protocol('echo "hello"') |
---|
Note: See
TracBrowser
for help on using the repository browser.