def setup_definitions(source, destination): try: json_dict = json.loads(source) except ValueError: with open(source) as j: json_dict = json.load(j) for_mappings.setup_definitions(json_dict, destination)
def setup_definitions(source, destination): module_dict = source.__dict__.copy() del module_dict['__builtins__'] for_mappings.setup_definitions(module_dict, destination)