def store ( self, cursor, annotype=ANNO_ANNOTATION ):

    sql = "INSERT INTO {} VALUES ( %s, %s, %s, %s )".format( anno_dbtables['annotation'] )

    data = zip( self.annidList, len(self.annidList)*[annotype] , self.confidenceList, self.statusList )

    try:
      cursor.executemany (sql, data)
    except MySQLdb.Error, e:
      logger.warning ( "Error inserting annotation %d: %s. sql=%s" % (e.args[0], e.args[1], sql))
      raise OCPCAError ( "Error inserting annotation: %d: %s. sql=%s" % (e.args[0], e.args[1], sql))

    # author: make a KV pair
    if self.author != "":
      self.kvpairs['ann_author'] = self.author
  
    if len(self.kvpairs) != 0:
      try:
        kvclause = ','.join(['(' + str(self.annid) +',\'' + k + '\',\'' + v +'\')' for (k,v) in self.kvpairs.iteritems()])  
      except:
        raise OCPCAError ( "Improperly formatted key/value csv string:" + kvclause ) 

      sql = "INSERT INTO %s VALUES %s" % ( anno_dbtables['kvpairs'], kvclause )

      try:
        cursor.execute(sql)
      except MySQLdb.Error, e:
        logger.warning ( "Error inserting kvpairs %d: %s. sql=%s" % (e.args[0], e.args[1], sql))
        raise OCPCAError ( "Error inserting kvpairs: %d: %s. sql=%s" % (e.args[0], e.args[1], sql))
Returns the size of a file-like object.
dataset/ETHPy150Open neurodata/ndstore/ocpca/batchAnnotation.py/BatchAnnotation.store--crossover with--dataset/ETHPy150Open rackspace/pyrax/pyrax/object_storage.py/get_file_size