PEATDB/zodbtest.py
def convertClass():
    """Convert records to proper module name"""

    project='test'
    DB=PDatabase(server='localhost',port=8080,
                 username='farrell',password='123',
                 project=project)

    for k in DB.getRecs():
        r=PEATRecord(k)
        rec = DB.data[k]
        print rec.__class__
        for f in rec.getFields():
            r[f] = rec[f]
        DB.data[k] = r
        print DB.data[k].__class__
    DB.commit(note='convert')
    return
Convert records to proper module name
Convert records to proper module name
Convert records to proper module name
def convertClass():
    project='test'
    DB=PDatabase(server='localhost',port=8080,
                 username='farrell',password='123',
                 project=project)
    for k in DB.getRecs():
        r=PEATRecord(k)
        rec = DB.data[k]
        print rec.__class__
        for f in rec.getFields():
            r[f] = rec[f]
        DB.data[k] = r
        print DB.data[k].__class__
    DB.commit(note='convert')
    return
def convertClass ( ) : project = 'test' DB = PDatabase ( server = 'localhost' , port = 8080 , username = 'farrell' , password = '123' , project = project ) for k in DB . getRecs ( ) : r = PEATRecord ( k ) rec = DB . data [ k ] print rec . __class__ for f in rec . getFields ( ) : r [ f ] = rec [ f ] DB . data [ k ] = r print DB . data [ k ] . __class__ DB . commit ( note = 'convert' ) return
Convert records to proper module name
Convert records to proper module name
"""Convert records to proper module name"""