<commit_before>from optparse import OptionParser

EXIT_FAIL = 1
EXIT_OK = 0


class VirtstrapRunner(object):
    """Routes commands to different commands"""
    def __init__(self):
        parser = OptionParser()
        self.parser = parser

    def main(self, args=None):
        """Runs the whole command line interface"""
        if not args:
            args = []
        parser = self.parser
        cli_options, cli_args = parser.parse_args(args=args)
        if not cli_args:
            parser.error('You must give a command (use "vstrap help" '
                    'to see a list of commands)')
        command = cli_args[0].lower()
        return EXIT_OK

    def load_command(self, name):
        """Load command from virtstrap.commands"""
        pass<commit_msg>Wrote some untested command loading code.<commit_after>from optparse import OptionParser

EXIT_FAIL = 1
EXIT_OK = 0


class VirtstrapRunner(object):
    """Routes commands to different commands"""
    def __init__(self):
        parser = OptionParser()
        self.parser = parser

    def main(self, args=None):
        """Runs the whole command line interface"""
        if not args:
            args = []
        parser = self.parser
        cli_options, cli_args = parser.parse_args(args=args)
        if not cli_args:
            parser.error('You must give a command (use "vstrap help" '
                    'to see a list of commands)')
        command = cli_args[0].lower()
        return EXIT_OK

    def load_command(self, name):
        """Load command from virtstrap.commands"""
        import_path = 'virtstrap.commands.%s' % name
        try:
            module = __import__(import_path)
        except ImportError:
            raise CommandDoesNotExist('Command "%s" does not exist' % name)
        return module

{'fraction_non_alphanumeric': 0.09362880886426593, 'fraction_numerical': 0.0033240997229916896, 'mean_word_length': 2.2836363636363637, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1262795', 'n_tokens_mistral': 510, 'n_tokens_neox': 496, 'n_words': 156}