def main():

  parser = argparse.ArgumentParser(description='Fetch Annotation metadata')
  parser.add_argument('host', action="store", help='HostName')
  parser.add_argument('token', action="store", help='Token')
  parser.add_argument('processes', action="store", type=int, help='Processes')
  
  global result 
  result = parser.parse_args()
  
  # Eastablishing the connection to the database. For now hardcoded to dsp62
  db = MySQLdb.connect(host="dsp062.pha.jhu.edu", user=ocpcaprivate.dbuser, passwd=ocpcaprivate.dbpasswd, db="MP4")
  cur = db.cursor()
  cur.execute("Select annoid from annotations")
  
  idList = []

  # Extracting the ids from the sql database
  for row in cur.fetchall():
    idList.append(int(row[0]));
  
  pdb.set_trace()
  # Launching the Process Pool
  try:
    pool = mp.Pool(result.processes)
    pool.map( ReadAnno, idList)
  except __HOLE__:
    print " Caught KeyboardInterrupt, terminating workers"
    pool.terminate()
    pool.join()
  else:
    print "Quitting Normally"
    pool.close()
    pool.join()
dataset/ETHPy150Open neurodata/ndstore/util/deprecated/deanLoadTest.py/main