Skip to content

Instantly share code, notes, and snippets.

View FelixHartmann's full-sized avatar

Félix Hartmann FelixHartmann

  • Clermont-Ferrand, France
View GitHub Profile
@FelixHartmann
FelixHartmann / traits_saving_in_json.py
Created September 16, 2013 15:50
Saving and loading Traits in a JSON file using the json Python module.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
'''Saving and loading Traits in a JSON file using the json Python module.
This example shows how to save Traits of an object with nested objects, and load
these Traits. In addition, we want to ignore some given nested objects in the
saving/loading process.
Based on a previous example by Pierre Haessig: