title: Python: get default gateway for a local interface/ip address in linux
body: <p>On Linux, how can I find the default gateway for a local ip address/interface using python?</p>
  
  <p>I saw the question "How to get internal IP, external IP and default gateway for UPnP", but the accepted solution only shows how to get the local IP address for a network interface on windows.</p>
  
  <p>Thanks.</p>