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
|
from StringIO import StringIO
|
||||||
import string
|
import string
|
||||||
|
@ -96,7 +96,7 @@ class DigestedCommands:
|
||||||
j = j + 1
|
j = j + 1
|
||||||
|
|
||||||
if not ( self.argkeys.has_key( "-class" ) and self.argkeys.has_key( "-author" ) ):
|
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.classList = self.getArgument( "-class" )
|
||||||
self.author = self.getArgument( "-author" )
|
self.author = self.getArgument( "-author" )
|
||||||
|
@ -175,7 +175,7 @@ class DigestedCommands:
|
||||||
loc = self.argkeys[ arg ] + 1
|
loc = self.argkeys[ arg ] + 1
|
||||||
rep = self.arglist[ loc ]
|
rep = self.arglist[ loc ]
|
||||||
if string.find( rep, "-" ) == 0:
|
if string.find( rep, "-" ) == 0:
|
||||||
raise self.usage
|
raise RuntimeError, self.usage
|
||||||
return rep
|
return rep
|
||||||
|
|
||||||
def getArglist( self, arg ):
|
def getArglist( self, arg ):
|
||||||
|
@ -186,7 +186,7 @@ class DigestedCommands:
|
||||||
rep.append( self.arglist[ loc ] )
|
rep.append( self.arglist[ loc ] )
|
||||||
loc = loc + 1
|
loc = loc + 1
|
||||||
if ( len( rep ) == 0 ):
|
if ( len( rep ) == 0 ):
|
||||||
raise self.usage
|
raise RuntimeError, self.usage
|
||||||
return rep
|
return rep
|
||||||
|
|
||||||
|
|
||||||
|
@ -587,7 +587,7 @@ class ClassCreator:
|
||||||
generator.genEpilogue();
|
generator.genEpilogue();
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
commands = DigestedCommands( )
|
commands = DigestedCommands( )
|
||||||
creator = ClassCreator( commands )
|
creator = ClassCreator( commands )
|
||||||
creator.generateCode()
|
creator.generateCode()
|
||||||
|
|
Loading…
Reference in New Issue