Пример #1
0
def _is_flash_installed():
    logging.info("checking %s", os.path.join(
            specialfolders.get_special_folder('System'),
            'Macromed', 'Flash', 'flashplayer.xpt'))
    return os.path.exists(os.path.join(
            specialfolders.get_special_folder('System'),
            'Macromed', 'Flash', 'flashplayer.xpt'))
Пример #2
0
def _is_flash_installed():
    folder = os.path.join(
        specialfolders.get_special_folder('System'),
        'Macromed',
        'Flash',
        'flashplayer.xpt')

    logging.debug("checking %s", folder)
    return os.path.exists(folder)
Пример #3
0
def get_plat_media_player_name_path():
    music_path = specialfolders.get_special_folder("My Music")
    if music_path == None:
        # if specialfolders returns None, then My Music doesn't exist
        # so we return (None, None) indicating there's no media
        # player.

        # FIXME - can the iTunes folder be in another place?
        return (None, None)

    itunes_path = os.path.join(music_path, 'iTunes')
    return (_('iTunes'), import_itunes_path(itunes_path))
Пример #4
0
def get_plat_media_player_name_path():
    music_path = specialfolders.get_special_folder("My Music")
    if music_path == None:
        # if specialfolders returns None, then My Music doesn't exist
        # so we return (None, None) indicating there's no media
        # player.

        # FIXME - can the iTunes folder be in another place?
        return (None, None)

    itunes_path = os.path.join(music_path, 'iTunes')
    return (_('iTunes'), import_itunes_path(itunes_path))
Пример #5
0
def get_all_font_info():
    check_init()
    font_dir = specialfolders.get_special_folder("Fonts")
    infos = {}
    for filename in os.listdir(font_dir):
        if not (filename.lower().endswith('.ttf') or 
                filename.lower().endswith('.ttc')):
            continue
        path = os.path.join(font_dir, filename)
        try:
            name = get_font_info(path)
        except ValueError, e:
            logging.info(e)
            continue
        if name not in infos:
            infos[name] = path
Пример #6
0
def get_all_font_info():
    check_init()
    font_dir = specialfolders.get_special_folder("Fonts")
    infos = {}
    for filename in os.listdir(font_dir):
        if not (filename.lower().endswith('.ttf')
                or filename.lower().endswith('.ttc')):
            continue
        path = os.path.join(font_dir, filename)
        try:
            name = get_font_info(path)
        except ValueError, e:
            logging.debug(e)
            continue
        if name not in infos:
            infos[name] = path
Пример #7
0
def get_default_search_dir():
    return specialfolders.get_special_folder("My Videos")
Пример #8
0
def _is_flash_installed():
    folder = os.path.join(specialfolders.get_special_folder('System'),
                          'Macromed', 'Flash', 'flashplayer.xpt')

    logging.debug("checking %s", folder)
    return os.path.exists(folder)