Changeset 76ca5cb for protocols/python/examples/sampleplugin.py
- Timestamp:
- 2013-03-27T20:31:46Z (12 years ago)
- Parents:
- 1dcfd1f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/python/examples/sampleplugin.py
r1dcfd1f r76ca5cb 7 7 import sys 8 8 import bpython 9 print "hello, I'm a test plugin running on Python", sys.version_info 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)) 10 11 11 print bpython.Protocol 12 print bpython.Protocol() 13 print bpython.register_protocol 14 15 try: 16 class MyProtocol(bpython.Protocol): 17 pass 18 except Exception, e: 19 print "error:", e 12 class MyProtocol(bpython.Protocol): 13 pass 20 14 21 15 myproto = MyProtocol() 22 print "myproto: ", myproto23 16 24 bpython.register_protocol('echo "hello"') 17 bpython.register_protocol('myproto', myproto) 18
Note: See TracChangeset
for help on using the changeset viewer.