Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

yaml for persistence

2 views
Skip to first unread message

Paul

unread,
Mar 2, 2009, 9:19:05 PM3/2/09
to
class User(object):
def __init__(self, uid):
self.uid = uid
self.__dict__.update(yaml.load(str('uid')+'.yaml'))

def save(self):
f=open(str(self.uid)+'.yaml')
yaml.dump(self.__dict__, f)

is there a better way to persist using Yaml

Paul
http://bidegg.com

0 new messages