コード例 #1
0
ファイル: query.py プロジェクト: xxyzzzq/quex
def __handle_codec(cl):
    codec_name = Setup.query_codec

    character_set = codec_db.get_supported_unicode_character_set(CodecAlias=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]
コード例 #2
0
def __handle_codec(cl):
    codec_name = Setup.query_encoding

    character_set = codec_db.get_supported_unicode_character_set(
        CodecAlias=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]
コード例 #3
0
ファイル: query.py プロジェクト: coderjames/pascal
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]
コード例 #4
0
ファイル: query.py プロジェクト: yifsun/amplify
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]
コード例 #5
0
ファイル: query.py プロジェクト: coderjames/pascal
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(CodecAlias=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]
コード例 #6
0
ファイル: query.py プロジェクト: yifsun/amplify
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(
        CodecAlias=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]