Fill in command-line arguments from argv

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