Advertisement
Guest User

Untitled

a guest
Oct 22nd, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.32 KB | None | 0 0
  1. def save_as_json(schedule_dictionary):
  2.     working_directory = get_work_dir()
  3.     file_template = '{}/app/json/{}.json'
  4.  
  5.     for room in schedule_dictionary:
  6.         with open(file_template.format(working_directory, room), 'w') as fout:
  7.             json.dump(schedule_dictionary[room], fout, ensure_ascii=False, indent=4)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement