Пример #1
0
def __handle_property(cl):
    if Setup.query_property == "":
        # no specific property => display all properties in the database
        sys.stderr.write("(please, wait for database parsing to complete)\n")
        ucs_property_db.init_db()
        print ucs_property_db.get_property_descriptions()

    else:
        # specific property => display information about it
        sys.stderr.write("(please, wait for database parsing to complete)\n")
        property = __get_property(Setup.query_property)
        if property is None: return True
        print property
Пример #2
0
def __handle_property(cl):
    if Setup.query_property == "":
        # no specific property => display all properties in the database
        sys.stderr.write("(please, wait for database parsing to complete)\n")
        ucs_property_db.init_db()
        print ucs_property_db.get_property_descriptions()

    else:
        # specific property => display information about it
        sys.stderr.write("(please, wait for database parsing to complete)\n")
        property = __get_property(Setup.query_property)
        if property is None: return True
        print property
Пример #3
0
def __get_property(Name_or_Alias):
    
    ucs_property_db.init_db()
    property = ucs_property_db[Name_or_Alias]
    if property.__class__.__name__ != "PropertyInfo":
        print property
        if Name_or_Alias.find("=") != -1: 
            print "Use command line option `--set-by-property` to investigate property settings."
        if Name_or_Alias.find("(") != -1:
            print "Use command line option `--set-by-expression` to investigate character set operations."
        return None
    
    property.init_code_point_db()
    return property
Пример #4
0
def __get_property(Name_or_Alias):

    ucs_property_db.init_db()
    property = ucs_property_db[Name_or_Alias]
    if property.__class__.__name__ != "PropertyInfo":
        print property
        if Name_or_Alias.find("=") != -1:
            print "Use command line option `--set-by-property` to investigate property settings."
        if Name_or_Alias.find("(") != -1:
            print "Use command line option `--set-by-expression` to investigate character set operations."
        return None

    property.init_code_point_db()
    return property