'Initializes a DesktopModuleInfo based on a python
module.  Static directories, settings, urls, etc.
will be found based on that module.'

def __init__(self, module):

    self.module = module
    self.name = module.__name__
    self.display_name = module.__name__
    module_root = os.path.dirname(module.__file__)
    self.root_dir = os.path.join(module_root, '..', '..')
    self._load_settings_module((module.__name__ + '.settings'))
    if hasattr(self.settings, 'NICE_NAME'):
        self.nice_name = self.settings.NICE_NAME
    else:
        self.nice_name = self.name
    if hasattr(self.settings, 'ICON'):
        self.icon_path = self.settings.ICON
    else:
        self.icon_path = ''
    if hasattr(self.settings, 'MENU_INDEX'):
        self.menu_index = self.settings.MENU_INDEX
    else:
        self.menu_index = 999
    self.is_url_namespaced = hasattr(self.settings, 'IS_URL_NAMESPACED')
    if (self.config_key is not None):
        self.display_name = self.config_key
    (new_style, old_style) = [os.path.abspath(p) for p in [os.path.join(module_root, 'static', self.name), os.path.join(self.root_dir, 'static')]]
    self.static_dir = None
    if os.path.isdir(new_style):
        self.static_dir = new_style
    elif os.path.isdir(old_style):
        LOG.debug(('Old-style    static    directory:    ' + str(old_style)))
        self.static_dir = old_style
    self.help_dir = None
    if self.static_dir:
        potential_help_dir = os.path.join(self.static_dir, 'help')
        if os.path.exists(potential_help_dir):
            self.help_dir = potential_help_dir
