Python Forum
How to direct python to use a specific network adapter?
Thread Rating:
  • 1 Vote(s) - 2 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to direct python to use a specific network adapter?
#1
This is a copy of a thread I started on StackOverflow which is getting down voted for being off topic. I regret that I didn't think to ask the good folks here first. https://stackoverflow.com/questions/4700...rk-adapter

Python (3.6) works great on my wired network adapter but I am unable to run pip (or pycurl or urllib) when on the wireless. I receive the following error, which led me to believe that it's proxy related:
Output:
PS C:\Projects> py -m pip install --upgrade pip Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x000001BC58ADF6D8>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed',))': /simple/pip/
But I'm not behind a proxy
Output:
PS C:\Projects> netsh winhttp show pro Current WinHTTP proxy settings: Direct access (no proxy server).
and I know how to set the proxy for pip, pycurl, and urllib.

How do I tell the python environment that I want it to direct all traffic over the wireless adapter instead of the wired adapter?

FYI, I'm always on wireless. The only time I have to connect to the wire is to do python network things.
Reply


Messages In This Thread
How to direct python to use a specific network adapter? - by ormesome - Oct-30-2017, 10:43 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Wi-Fi Direct Python teodorisss 2 3,940 Aug-14-2020, 07:21 AM
Last Post: teodorisss
  Why Python for Network Programming ashilnayak2 1 2,544 May-18-2020, 09:20 AM
Last Post: DeaD_EyE
  Assistance with Python Network script cscecela 2 4,861 Feb-24-2019, 01:23 AM
Last Post: searching1
  A virtual network to use with python to learn about networking with python? marienbad 0 2,404 Feb-11-2019, 09:20 PM
Last Post: marienbad
  Batch network configuration/ verification task using Python anonyfate 1 3,238 Jul-03-2018, 04:30 AM
Last Post: buran

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020