Hello: As always, consult with your surgeon. I did, however, begin a very vigorous upper body exercise regime after I had my staples removed (made showering easier). I carefully selected machines that did not violate my precautions (and I could prop crutches against) -- this included machines that isolated muscle groups from the waist up, so no strain was placed on the hip and leg. In a high-end fitness club I found 5-6 machines that helped keep me active until all restrictions were lifted -- so it really depends on your gym. Avoid exercises that allow your legs to dangle (pull-ups, etc.). I found them uncomfortable.
Now, today, 1.5 years later I just completed a lunch-time workout 1/2 hour on a 'spinning' bike, 130 lb sets on a hip abductor, free weights, and punching and kicking a speed bag. Good luck.