mkRPG
 All Classes Namespaces Functions
Functions | Variables
parsing::parsing_utils Namespace Reference

Functions

def try_open_and_parse
def fail_not_found
def format_type
def collect_data
def parse_multiple_files

Variables

tuple INT = re.compile('[0-9]+$')
tuple FLOAT = re.compile(r'[0-9]+[\.,][0-9]$')

Detailed Description

This module contains many utilities that are called almost everywhere
during the parsing.
It is more a toolbox than anything.

Function Documentation

def parsing.parsing_utils.collect_data (   key,
  args 
)
Collects all items corresponding to key argument in *args.  It realizes
a depth-first travel of the dictionary, calling itself recursively on the
structures.
Error when a tag is not found in a file, and should be in.
If the string can be converted to an int or a float, converts it.
def parsing.parsing_utils.parse_multiple_files (   parsing_method,
  args 
)
Parses the given file lists, and returns the dictionary containing the
whole data parsed by the parsing_method function.
This function tries to open the file ```xml_file```, and to parse it.
The program exits if one of both action fails.
 All Classes Namespaces Functions