Although I asked my GP and I had bypass, she said the general rule of thumb is when you can do an emergency stop. It also depends on the type of surgery, ie whether it was keyhole or open. As a general rule, for open surgery, it is 6 weeks. For keyhole, she said to me to leave it for a couple of weeks and when you can do an emergency stop, comfortably (ie with no pain that would take your foot off the brake) then you can drive. This is also important for insurance reasons