Please use below script to get network configuration details,
import os; result=os.popen(‘ipconfig /all’).read() print(result);
Sample output would be ,