示例#1
0
文件: main.py 项目: leosartaj/credit
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)
示例#2
0
文件: main.py 项目: leosartaj/credit
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)
示例#3
0
文件: main.py 项目: leosartaj/credit
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))
示例#4
0
文件: main.py 项目: leosartaj/credit
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))