コード例 #1
0
ファイル: put_orbs.py プロジェクト: jeral2007/hfd_python
def put_orbs(args):
    orblist = take_orbs(args[0])
    comps = propdb.get_comps()
    comp_id = None
    for cid, cname, ctime in comps:
        if args[1].upper() == cname:
            comp_id = cid
            break
    if comp_id is None:
        raise KeyError("There is no such comp in database")
    for n, en, orbtype in orblist:
        propdb.add_orb(n, en, orbtype, comp_id)
コード例 #2
0
ファイル: read_propdb.py プロジェクト: jeral2007/hfd_python
def print_comps(actions):
    for row in propdb.get_comps():
        print "\t".join(str(c) for c in row)