Exemple #1
0
def saveSheet(fPath, json_dict):
    """
    Saves the json data
    """
    if not fileExists(fPath):
        raise exce.CreditSheetError('No such credit sheet')

    with open(fPath, 'w') as f:
        json_str = jh.dict_to_json(json_dict)
        f.write(json_str)
Exemple #2
0
def saveSheet(fPath, json_dict):
    """
    Saves the json data
    """
    if not fileExists(fPath):
        raise exce.CreditSheetError('No such credit sheet')

    with open(fPath, 'w') as f:
        json_str = jh.dict_to_json(json_dict)
        f.write(json_str)
Exemple #3
0
def newSheet(fPath, json_dict={INIT: timestamp()}):
    if fileExists(fPath):
        raise exce.CreditSheetExists('Credit sheet Exists')

    with open(fPath, 'w') as f:
        f.write(jh.dict_to_json(json_dict))
Exemple #4
0
def newSheet(fPath, json_dict={INIT: timestamp()}):
    if fileExists(fPath):
        raise exce.CreditSheetExists('Credit sheet Exists')

    with open(fPath, 'w') as f:
        f.write(jh.dict_to_json(json_dict))