Exemplo n.º 1
0
def __handle_codec_for_language(cl):
    language_name = cl.follow("", "--codec-for-language")

    supported_language_list = codec_db.get_supported_language_list()

    if language_name == "":
        txt      = "Missing argument after '--codec-for-language'. Supported languages are:\n\n"
        line_txt = ""
        for name in supported_language_list:
            line_txt += name + ", "
            if len(line_txt) > 50: txt += line_txt + "\n"; line_txt = ""
        txt += line_txt
        txt = txt[:-2] + "."
        error_msg(txt)

    print "Possible Codecs: " + repr(codec_db.get_codecs_for_language(language_name))[1:-1]
Exemplo n.º 2
0
def __handle_codec_for_language(cl):
    language_name = cl.follow("", "--codec-for-language")

    supported_language_list = codec_db.get_supported_language_list()

    if language_name == "":
        txt = "Missing argument after '--codec-for-language'. Supported languages are:\n\n"
        line_txt = ""
        for name in supported_language_list:
            line_txt += name + ", "
            if len(line_txt) > 50:
                txt += line_txt + "\n"
                line_txt = ""
        txt += line_txt
        txt = txt[:-2] + "."
        error_msg(txt)

    print "Possible Codecs: " + repr(
        codec_db.get_codecs_for_language(language_name))[1:-1]
Exemplo n.º 3
0
def __handle_codec(cl):
    codec_name = cl.follow("", "--codec-info")
    supported_codec_list = codec_db.get_supported_codec_list(IncludeAliasesF=True)

    if codec_name == "":
        txt      = "Missing argument after '--codec-info'. Supported codecs are:\n\n"
        line_txt = ""
        for name in supported_codec_list:
            line_txt += name + ", "
            if len(line_txt) > 50: txt += line_txt + "\n"; line_txt = ""
        txt += line_txt
        txt = txt[:-2] + "."
        error_msg(txt)

    character_set = codec_db.get_supported_unicode_character_set(codec_name)
    __display_set(character_set, cl)

    print
    print "Codec is designed for:"
    print repr(codec_db.get_supported_language_list(codec_name))[1:-1]
Exemplo n.º 4
0
def __handle_codec(cl):
    codec_name = cl.follow("", "--codec-info")
    supported_codec_list = codec_db.get_supported_codec_list(
        IncludeAliasesF=True)

    if codec_name == "":
        txt = "Missing argument after '--codec-info'. Supported codecs are:\n\n"
        line_txt = ""
        for name in supported_codec_list:
            line_txt += name + ", "
            if len(line_txt) > 50:
                txt += line_txt + "\n"
                line_txt = ""
        txt += line_txt
        txt = txt[:-2] + "."
        error_msg(txt)

    character_set = codec_db.get_supported_unicode_character_set(codec_name)
    __display_set(character_set, cl)

    print
    print "Codec is designed for:"
    print repr(codec_db.get_supported_language_list(codec_name))[1:-1]