コード例 #1
0
ファイル: main.py プロジェクト: Weirdodude101/Project-Users
def createYaml(filepath,username,password,fname,lname,age,gender,hobby):
	personDict = dict(
		Username = username,
		Password = password,
		FirstName = fname,
		LastName = lname,
		Age = age,
		Gender = gender,
		Hobby = hobby,
		Admin = False
		)
	with open(filepath, 'w') as outfile:
		newAcc = outfile.write(yaml.dump(personDict,default_flow_style=False) )
	return newAcc
コード例 #2
0
def createYaml(filepath, username):
    with open(filepath, 'w') as outfile:
        newAcc = outfile.write(
            yaml.dump(personDict[username], default_flow_style=False))
    return newAcc
コード例 #3
0
def dumpYaml(filepath, option):
    with open(filepath, 'w') as outfile:
        newAttb = outfile.write(yaml.dump(option, default_flow_style=False))
    return newAttb
コード例 #4
0
def createYaml(filepath,username):
    with open(filepath, 'w') as outfile:
        newAcc = outfile.write(yaml.dump(personDict[username],default_flow_style=False) )
    return newAcc
コード例 #5
0
def dumpYaml(filepath, option):
    with open(filepath, 'w') as outfile:
        newAttb = outfile.write(yaml.dump(option,default_flow_style=False) )
    return newAttb