# Path: webtools/utils/imp.py
# def load_class(path):
#     """
#     Load class from path.
#     """
# 
#     mod_name, klass_name = None, None
# 
#     try:
#         mod_name, klass_name = path.rsplit('.', 1)
#         mod = import_module(mod_name)
#     except AttributeError as e:
#         raise RuntimeError("Error importing {0}: '{1}'".format(mod_name, e))
# 
#     try:
#         klass = getattr(mod, klass_name)
#     except AttributeError:
#         raise RuntimeError('Module "{0}" does not define a "{1}" class'.format(mod_name, klass_name))
# 
#     return klass


import sys
import argparse
import traceback
import importlib
import inspect
import logging
import logging.handlers
import os
from webtools.utils.imp import load_class

        Developers creating new command base classes (such as
        :class:`Lister` and :class:`ShowOne`) should override this
        method to wrap :meth:`take_action`.
        """
        self.take_action(parsed_args)
        return 0


class CommandManager(object):
    commands = {}
    default_commands= [
        "webtools.management.commands.help.HelpCommand",
        "webtools.management.commands.runserver.RunserverCommand",
        "webtools.management.commands.syncdb.SyncdbCommand",
        "webtools.management.commands.syncdb.DropdbCommand",
        "webtools.management.commands.shell.ShellCommand",
    ]

    def __init__(self, app):
        self.app = app

    def _load_commands(self):
        commands = {}

        command_list = set(self.default_commands[:])
        if self.app.conf is not None:
            command_list.update(self.app.conf.COMMANDS or [])

        for class_path in command_list:

# Path: webtools/utils/imp.py
# def load_class(path):
#     """
#     Load class from path.
#     """
# 
#     mod_name, klass_name = None, None
# 
#     try:
#         mod_name, klass_name = path.rsplit('.', 1)
#         mod = import_module(mod_name)
#     except AttributeError as e:
#         raise RuntimeError("Error importing {0}: '{1}'".format(mod_name, e))
# 
#     try:
#         klass = getattr(mod, klass_name)
#     except AttributeError:
#         raise RuntimeError('Module "{0}" does not define a "{1}" class'.format(mod_name, klass_name))
# 
#     return klass


# Path: webtools/management/base.py
import sys
import argparse
import traceback
import importlib
import inspect
import logging
import logging.handlers
import os
from webtools.utils.imp import load_class


        Developers creating new command base classes (such as
        :class:`Lister` and :class:`ShowOne`) should override this
        method to wrap :meth:`take_action`.
        """
        self.take_action(parsed_args)
        return 0


class CommandManager(object):
    commands = {}
    default_commands= [
        "webtools.management.commands.help.HelpCommand",
        "webtools.management.commands.runserver.RunserverCommand",
        "webtools.management.commands.syncdb.SyncdbCommand",
        "webtools.management.commands.syncdb.DropdbCommand",
        "webtools.management.commands.shell.ShellCommand",
    ]

    def __init__(self, app):
        self.app = app

    def _load_commands(self):
        commands = {}

        command_list = set(self.default_commands[:])
        if self.app.conf is not None:
            command_list.update(self.app.conf.COMMANDS or [])

        for class_path in command_list:

            klass = load_class(class_path)