예제 #1
0
파일: app.py 프로젝트: rosswhitfield/ase
def image(name):
    path = os.path.join(tmpdir, name)
    if not os.path.isfile(path):
        id = int(name[:-4])
        atoms = db.get_atoms(id)
        atoms2png(atoms, path)

    return send_from_directory(tmpdir, name)
예제 #2
0
파일: app.py 프로젝트: uu1477/MyAse
def image(name):
    path = os.path.join(tmpdir, name)
    if not os.path.isfile(path):
        id = int(name[:-4])
        atoms = db.get_atoms(id)
        atoms2png(atoms, path)

    return send_from_directory(tmpdir, name)
예제 #3
0
파일: app.py 프로젝트: essil1/ase-laser
def image(project, name):
    id = int(name[:-4])
    name = project + '-' + name
    path = op.join(tmpdir, name)
    if not op.isfile(path):
        db = databases[project]
        atoms = db.get_atoms(id)
        atoms2png(atoms, path)

    return send_from_directory(tmpdir, name)
예제 #4
0
def image(name):
    id = int(name[:-4])
    name = prefix() + name
    path = op.join(tmpdir, name)
    if not op.isfile(path):
        db = database()
        atoms = db.get_atoms(id)
        atoms2png(atoms, path)

    return send_from_directory(tmpdir, name)