Also, I believe the US boats in WWII technically ran off electrics all the time, that is, the electric motors would always drive the screw shafts, and the diesels would be used simply to generate power for them.
http://www.fleetsubmarine.com/propulsion.html