Skip to content

Instantly share code, notes, and snippets.

@gelendir
Created November 26, 2010 02:56
Show Gist options
  • Save gelendir/716220 to your computer and use it in GitHub Desktop.
Save gelendir/716220 to your computer and use it in GitHub Desktop.
java2python
#!/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