mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-02-17 06:00:42 +01:00
Added question about example and pager functionality.
This commit is contained in:
parent
06f7fef11f
commit
ac8a5bf73a
@ -39,6 +39,7 @@
|
|||||||
import os
|
import os
|
||||||
import imp
|
import imp
|
||||||
import sys
|
import sys
|
||||||
|
import pydoc
|
||||||
import socket
|
import socket
|
||||||
import pprint
|
import pprint
|
||||||
sys.path.insert(0, 'src')
|
sys.path.insert(0, 'src')
|
||||||
@ -147,10 +148,11 @@ if __name__ == '__main__':
|
|||||||
else:
|
else:
|
||||||
print 'This plugin has no documentation.'
|
print 'This plugin has no documentation.'
|
||||||
if hasattr(module, 'example'):
|
if hasattr(module, 'example'):
|
||||||
print
|
if yn('Would you like to see a usage example?') == 'y':
|
||||||
print 'Here\'s an example of usage of this module:'
|
print
|
||||||
print
|
print 'Here\'s an example of usage of this module:'
|
||||||
print module.example
|
print
|
||||||
|
pydoc.pager(module.example)
|
||||||
if yn('Would you like to add this plugin?') == 'y':
|
if yn('Would you like to add this plugin?') == 'y':
|
||||||
if hasattr(module, 'configure'):
|
if hasattr(module, 'configure'):
|
||||||
module.configure(onStart, afterConnect, advanced)
|
module.configure(onStart, afterConnect, advanced)
|
||||||
@ -231,6 +233,13 @@ if __name__ == '__main__':
|
|||||||
print '"supybot: cpustats".'
|
print '"supybot: cpustats".'
|
||||||
s = anything('What would you like supybot\'s prefixChar(s) to be?')
|
s = anything('What would you like supybot\'s prefixChar(s) to be?')
|
||||||
configVariables['prefixChars'] = s
|
configVariables['prefixChars'] = s
|
||||||
|
|
||||||
|
if not advanced:
|
||||||
|
try:
|
||||||
|
import twistedDrivers
|
||||||
|
configVariables['driverModule'] = 'twistedDrivers'
|
||||||
|
except ImportError:
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
template = template.replace('%%configVariables%%',
|
template = template.replace('%%configVariables%%',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user