Wow, I'd forgotten how old this code was. Updated to work with python > 2.3.
This commit is contained in:
parent
636a23d80a
commit
9a658ad784
10
bigfcc.py
10
bigfcc.py
|
@ -1,4 +1,4 @@
|
|||
#!/usr/local/bin/python
|
||||
#!/usr/bin/env python
|
||||
|
||||
from StringIO import StringIO
|
||||
import string
|
||||
|
@ -96,7 +96,7 @@ class DigestedCommands:
|
|||
j = j + 1
|
||||
|
||||
if not ( self.argkeys.has_key( "-class" ) and self.argkeys.has_key( "-author" ) ):
|
||||
raise self.usage
|
||||
raise RuntimeError, self.usage
|
||||
|
||||
self.classList = self.getArgument( "-class" )
|
||||
self.author = self.getArgument( "-author" )
|
||||
|
@ -175,7 +175,7 @@ class DigestedCommands:
|
|||
loc = self.argkeys[ arg ] + 1
|
||||
rep = self.arglist[ loc ]
|
||||
if string.find( rep, "-" ) == 0:
|
||||
raise self.usage
|
||||
raise RuntimeError, self.usage
|
||||
return rep
|
||||
|
||||
def getArglist( self, arg ):
|
||||
|
@ -186,7 +186,7 @@ class DigestedCommands:
|
|||
rep.append( self.arglist[ loc ] )
|
||||
loc = loc + 1
|
||||
if ( len( rep ) == 0 ):
|
||||
raise self.usage
|
||||
raise RuntimeError, self.usage
|
||||
return rep
|
||||
|
||||
|
||||
|
@ -587,7 +587,7 @@ class ClassCreator:
|
|||
generator.genEpilogue();
|
||||
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
commands = DigestedCommands( )
|
||||
creator = ClassCreator( commands )
|
||||
creator.generateCode()
|
||||
|
|
Loading…
Reference in New Issue