【发布时间】:2014-08-28 17:22:32
【问题描述】:
是否可以在 Windows 7 中的 Python 中禁用和启用网络连接?我在这里看到了一个关于此的先前问题:How to programmatically enable/disable network interfaces? (Windows XP),但仍然找不到解决方案!请与我分享代码!马丁的回答给了我这个:b'Index Name
\r\r\n0 WAN Miniport (SSTP) \r\r\n1 WAN Miniport (IKEv2) \r\r\n2 WAN Miniport (L2TP) \r\r\n3 WAN Miniport (PPTP) \r\r\n4 WAN Miniport (PPPOE) \r\r\n5 WAN Miniport (IPv6) \r\r\n6 WAN Miniport (Network Monitor) \r\r\n7 Realtek RTL8102E/RTL8103E Family PCI-E Fast Ethernet NIC (NDIS 6.20) \r\r\n8 WAN Miniport (IP) \r\r\n9 Microsoft ISATAP Adapter \r\r\n10 RAS Async Adapter \r\r\n11 Atheros AR5007 802.11b/g WiFi Adapter \r\r\n12 Teredo Tunneling Pseudo-Interface \r\r\n13 Microsoft ISATAP Adapter #2 \r\r\n\r\r\n'
【问题讨论】:
标签: python windows-7 python-3.3