Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

22 lines (19 sloc) 0.55 kB
from persistent import Persistent
class Conference(Persistent):
def __init__(self, name, year):
self.name = name
self.year = year
def title(self):
return self.name.capitalize()
if __name__ == '__main__':
import transaction
from ZODB.FileStorage import FileStorage
from ZODB.DB import DB
fs = FileStorage('data.fs')
db = DB(fs)
conn = db.open()
root = conn.root()
pycon = Conference('pycon', 2011)
print pycon.title(), pycon.year
root['pycon'] = pycon
transaction.commit()
Jump to Line
Something went wrong with that request. Please try again.