File open functionality implemented
[biacv.git] / biacv_data.py
index 010e664..1146102 100644 (file)
@@ -12,6 +12,10 @@ class BiaCVData:
        def save_data (self, filepath):
                json.dump (self.data, file (filepath, "w"), indent=4)
 
+       # load the data from a file
+       def load_data (self, filepath):
+               self.data = json.load (file (filepath, "rb"))
+
        # set the document title
        def set_document_title (self, title):
                self.data["title"] = title