Optparsified.

This commit is contained in:
Jeremy Fincher 2003-10-02 05:26:10 +00:00
parent fd22981d9d
commit eb3be4c0d1
1 changed files with 4 additions and 11 deletions

View File

@ -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 = ''