mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-11 12:42:34 +01:00
Optparsified.
This commit is contained in:
parent
fd22981d9d
commit
eb3be4c0d1
@ -9,6 +9,7 @@ import sys
|
|||||||
import pydoc
|
import pydoc
|
||||||
import pprint
|
import pprint
|
||||||
import socket
|
import socket
|
||||||
|
import optparse
|
||||||
import textwrap
|
import textwrap
|
||||||
|
|
||||||
import ansi
|
import ansi
|
||||||
@ -127,18 +128,10 @@ def myPrint(s, unformatted=True):
|
|||||||
print textwrap.fill(s)
|
print textwrap.fill(s)
|
||||||
print
|
print
|
||||||
|
|
||||||
def upgradeFromFormerBotscript(filename):
|
|
||||||
pass
|
|
||||||
#botscript = __import__(filename)
|
|
||||||
### Eh, just don't forget this.
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
### Remember to do some optparse stuff here. Especially we need to
|
parser = optparse.OptionParser(usage='Usage: %prog [options]',
|
||||||
### remember to be able to upgrade from another created botscript.
|
version='Supybot %s' % conf.version)
|
||||||
|
(options, args) = parser.parse_args()
|
||||||
## these will be overridden by either the former botscript or the the
|
|
||||||
## answers given by the user. But we need them here to avoid the evil
|
|
||||||
## UnboundLocalError.
|
|
||||||
nick = ''
|
nick = ''
|
||||||
user = ''
|
user = ''
|
||||||
ident = ''
|
ident = ''
|
||||||
|
Loading…
Reference in New Issue
Block a user