LOS ANGELES -- Fay Kanin, an Oscar-nominated screenwriter for the 1958 Clark Gable-Doris Day comedy Teacher's Pet and former president of the Academy of Motion Picture Arts and Sciences, died Wednesday. She was 95.In a writing career that spanned more than four decades, Kanin penned screenplays for movies such as the 1954 Elizabeth Taylor romantic drama Rhapsody and television specials such as Tell Me Where It Hurts, for which she won two Emmy Awards in 1974. She won another Emmy in 1979 for producing Friendly Fire, a critically acclaimed Carol Burnett TV movie based on the true story of a U.S. soldier killed in the Vietnam War.Kanin served as president of the Academy of Motion Picture Arts and Sciences from 1979 to 1983, and was its second female president after actress Bette Davis. Kanin also was a longtime chairwoman of the National Film Preservation Board of the Library of Congress and served on the board of the American Film Institute.She died of natural causes at her home in Santa Monica, Calif., said caretaker Monique West.The Academy said in a statement that Kanin had been instrumental in expanding the organization's public programming and was committed to its preservation work."A tireless mentor and inspiration to countless filmmakers, Fay's passion for film continues to inspire us daily," the Academy said.As a screenwriter who got her start in the early 1940s, Kanin was a pioneering figure in an industry then dominated by men. In the late 1940s and early 1950s, she and husband Michael Kanin, the late Oscar-winning screenwriter, were placed on a so-called gray list -- a less formal and severe version of the anti-Communist Hollywood blacklist. The Kanins, who were friends with Communist Party members, were denied work for about two years in the early 1950s until director Charles Vidor asked them to write Rhapsody.Kanin told the Los Angeles Times in a 2001 interview that Teacher's Pet was originally written as a serious film, but she and her husband found no takers for the script. Rewritten by the couple as a comedy, the project sold to Paramount Pictures.Fay Kanin's writing credits also include the 1949 Broadway comedy Goodbye, My Fancy and the 1959 Broadway adaptation of Rashomon.