Surgery and restriction on exercise

Options
I'm a little nervous because in a few days, I need to have relatively minor surgery (bladder thing) and I won't be able to exercise like I normally do for 6 weeks. I will be able to start walking but no lifting anything heavier than 10 lbs for 6 weeks, no running....and I'm nervous that it will be difficult to manage my food intake without having exercise to help balance it out. I am used to being pretty active and this exercise restriction will be really tough. Plus, I love exercising a bit more strenuously for the good way it makes me feel. I feel like I won't be able to maintain weight loss without the exercise I normally do. Anyone else had to experience this and any advice?