My husband had a freak accident in the pool, because of which he hurt his foot and has been advised not to exert his foot for some time (2 weeks gone one still to go.) He has the same problem, where he cannot exercise. So he is just doing what the doctor ordered - just chilling out and taking it easy. I do not know if this would help you, but just wanted to share it with you.
I don't know how much your core can take; but I would try a medicine ball. Tossing it up in the air and catching it.
Can you take simple little walks? Try that too.
Dumb bells are good too. Push ups, sit ups, upper body stretches.
I hope this helps.
An operation is a very good reason to take it easy, or even stay away from, the gym. If you really want to keep your upper body moving, consider doing some machine assisted exercises with some very light weights. Depending on where the injury is, you may need to focus on whether or not your overworking your core with the particular upper body exercise you choose to do.