Codebase list sugar-read-activity / 3f512b9
Replace use of simplejson - SL #4487 Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org> Gonzalo Odiard 10 years ago
1 changed file(s) with 3 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
1414 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
1515
1616 import os
17 import simplejson
17 import json
1818 from gettext import gettext as _
1919
2020 from gi.repository import Gtk
9494 if os.path.exists(data_file_name):
9595 f = open(data_file_name, 'r')
9696 try:
97 speech_parameters = simplejson.load(f)
97 speech_parameters = json.load(f)
9898 speech.voice = speech_parameters['voice']
9999 finally:
100100 f.close()
123123 data_file_name = os.path.join(data_path, 'speech_params.json')
124124 f = open(data_file_name, 'w')
125125 try:
126 simplejson.dump(speech_parameters, f)
126 json.dump(speech_parameters, f)
127127 finally:
128128 f.close()
129129