コード例 #1
0
def get_structure_dictionary_from_file(structure_file):
    """Returns a structure as a dictionary from the given file.
    """
    properties = property_reader.make_dictionary(structure_file)
    properties = {key: processor_utils.adjust_property_value(properties[key])
                  for key in properties.keys()}
    return properties
コード例 #2
0
def get_translator_dictionary_from_file(translator_file):
    """Returns a translator as a dictionary from the given file.
    """
    properties = property_reader.make_dictionary(translator_file)
    properties = {key: processor_utils.adjust_property_value(properties[key]) for key in properties.keys()}
    properties["translator_file"] = translator_file
    return properties
コード例 #3
0
def file_to_properties(extension, rel_exec_path=None, rel_property_path=None):
    current_path = os.path.dirname(os.path.realpath(__file__))
    setup_file = current_path.replace(rel_exec_path, rel_property_path)
    setup_file += extension
    properties = property_reader.make_dictionary(setup_file)
    return properties
コード例 #4
0
ファイル: filesystem_dao.py プロジェクト: RBerkheimer/mars
def get_dictionary_by_profile(path, full_path=False):
    if not full_path:
        path = replace_relative_path(path, '/src/main/dao/filesystem',
                                     '/properties/profiles/')
    return property_reader.make_dictionary(path)