Created
November 26, 2010 02:56
-
-
Save gelendir/716220 to your computer and use it in GitHub Desktop.
java2python
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import sys | |
from optparse import OptionParser | |
usage = """%prog : convert java app to an equivalent in python code. | |
usage : %prog PROGRAM""" | |
parser = OptionParser(usage=usage) | |
(options, args) = parser.parse_args() | |
if len(args) == 0: | |
parser.print_help() | |
else: | |
#Universal truth : java apps are ALWAYS bloated. Raise an error now instead of wasting precious CPU cycles | |
#trying to convert the app in the first place. | |
raise OverflowError("%s : StackTrace overflow occured during conversion. Program is too bloated" % args[0]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment