Feels weird to answer a 2 year old question that already has a great answer, but since my search took me here, I figure others might see this too:
This is also now possible with Process Builder, for anyone who shies away from Apex. In my use case, I wanted to set a price book upon opportunity creation, but still allow users to have access to the other price books. Since I was also looking to add a base "package" of products to every opp, process builder was my first thought over Apex. Works well -- I may flip it to a trigger eventually so I can do some more advanced manipulation of revenue schedules, but for now, this got the job done! Definitely bookmarking eyescream's answer as well, though!