You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am getting the following error while using iPython (Python 3.6.3 (v3.6.3:2c5fed86e0, Oct 3 2017, 00:32:08)) in a terminal window on a mac running Sierra and implementing the following example:
For convenience, we also allow you to index the dictionary with the special value 'default', which returns a dictionary mapping address families to the default gateway in each case. Thus you can get the default IPv4 gateway with
I am getting the following error while using iPython (Python 3.6.3 (v3.6.3:2c5fed86e0, Oct 3 2017, 00:32:08)) in a terminal window on a mac running Sierra and implementing the following example:
For convenience, we also allow you to index the dictionary with the special value 'default', which returns a dictionary mapping address families to the default gateway in each case. Thus you can get the default IPv4 gateway with
The results from this test - I tried replacing "[]" with "()" in different combinations but get errors as follows:
In [15]: gws=netifaces.gateways
In [16]: gws['default'][netifaces.AF_INET]
TypeError Traceback (most recent call last)
in ()
----> 1 gws['default'][netifaces.AF_INET]
TypeError: 'builtin_function_or_method' object is not subscriptable
In [17]: gws['default'][netifaces.AF_INET]
TypeError Traceback (most recent call last)
in ()
----> 1 gws['default'][netifaces.AF_INET]
TypeError: 'builtin_function_or_method' object is not subscriptable
In [18]: gws('default')[netifaces.AF_INET]
TypeError Traceback (most recent call last)
in ()
----> 1 gws('default')[netifaces.AF_INET]
TypeError: gateways() takes no arguments (1 given)
In [19]: gws'default'
TypeError Traceback (most recent call last)
in ()
----> 1 gws'default'
TypeError: 'builtin_function_or_method' object is not subscriptable
In [20]: gws('default')(netifaces.AF_INET)
TypeError Traceback (most recent call last)
in ()
----> 1 gws('default')(netifaces.AF_INET)
TypeError: gateways() takes no arguments (1 given)
Is there a solution to this issue?
The text was updated successfully, but these errors were encountered: