Exemplo n.º 1
0
    """
    assert os.path.isfile("moviedb.bin"), "La base de datos no esta creada"
    db = shelve.open("moviedb.bin")
    person = {}
    try:
        person[personName] = db[personName]
    except KeyError:
        person = findPersonRegex(db, personName)

    db.close()
    return person


if __name__ == '__main__':

    person1 = "Rachel Appleton"
    person2 = 'Kristen Hager'
    person3 = 'Seth Rogen'

    print("La actriz {}".format(person1))
    print("PERSON |--- FILM --- | --- YEAR --- | --- ROLE ---")
    displayResults(search(person1))

    print("La actriz {}".format(person2))
    print("PERSON |--- FILM --- | --- YEAR --- | --- ROLE ---")
    displayResults(search(person2))

    print("El actor {}".format(person3))
    print("PERSON |--- FILM --- | --- YEAR --- | --- ROLE ---")
    displayResults(search(person3))