<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def main(cls, args=None):
 """ Fill in command-line arguments from argv """

        if args is None:
            args = sys.argv[1:]

        try:
            o = cls()
            o.parseOptions(args)
        except usage.UsageError as e:
            print(o.getSynopsis())
            print(o.getUsage())
            print(str(e))
            return 1
        except CLIError as ce:
            print(str(ce))
            return ce.returnCode

        return 0