A module for loading dictionaries from text files.
Exported classes:
Dictionary – Loads a text file into an internal python dict.
Created on Jun 20, 2012
@author: ccabot
-
class pgmlibrary.dictionary.Dictionary[source]
Load a text file into an internal python dict.
Public functions:
dictload – Load a python dict from JSON-like text in a text file.
-
dictload(path)[source]
Load a python dict from a JSON-like text in a text file.
Arguments:
path – Path to the text file (e.g. “mydictionary.txt”)
Attributes instantiated:
self.alldata – The entire loaded dictionary.
Other actions:
Checks that the dictionary was properly loaded.