original_docstring: 
          Get network configuration from /etc/network/interfaces
  
          This is the default place where network configuration is stored before raspbian stretch
  
          Returns:
              dict: configured interfaces::
  
              {
                  interface name (string): {
                      interface (string): interface name,
                      mode (string): interface mode (see etcnetworkinterface MODE_XXX)
                      address (string): ip address
                      netmask (string): netmask address
                      gateway (string): gateway address
                      dnsnameservers (string): dns nameservers
                      wifi (bool): True if interface is wifi
                      wifinetwork (string): name of network if device is connected via wifi
                  },
                  ...
              }
  
          
docstring: Get network configuration from /etc/network/interfaces
  This is the default place where network configuration is stored before raspbian stretch
docstring_tokens: Get network configuration from / etc / network / interfaces This is the default place where network configuration is stored before raspbian stretch
code: def _get_network_config_from_network_interfaces(self):
          """
          Get network configuration from /etc/network/interfaces
  
          This is the default place where network configuration is stored before raspbian stretch
  
          Returns:
              dict: configured interfaces::
  
              {
                  interface name (string): {
                      interface (string): interface name,
                      mode (string): interface mode (see etcnetworkinterface MODE_XXX)
                      address (string): ip address
                      netmask (string): netmask address
                      gateway (string): gateway address
                      dnsnameservers (string): dns nameservers
                      wifi (bool): True if interface is wifi
                      wifinetwork (string): name of network if device is connected via wifi
                  },
                  ...
              }
  
          """
          # get configuration
          configured_interfaces = self.etcnetworkinterfaces.get_configurations()
  
          # remove useless lo interface
          if 'lo' in configured_interfaces:
              configured_interfaces.pop('lo')
  
          # add more infos
          for interface_name, configured_interface in configured_interfaces.items():
              # add wifi infos
              if interface_name in self.wifi_interfaces:
                  # interface is wifi and connected
                  configured_interface.update({
                      'wifi': True,
                      'wifinetwork': self.wifi_interfaces[interface_name]['network']
                  })
              elif configured_interface['wpaconf'] is not None:
                  # interface is wifi but not connected
                  configured_interface.update({
                      'wifi': True,
                      'wifinetwork': None,
                  })
              else:
                  # interface is not wifi
                  configured_interface.update({
                      'wifi': False,
                      'wifinetwork': None,
                  })
  
          # fix returned config
          for configured_interface in configured_interfaces.values():
              'auto' in configured_interface and configured_interface.pop('auto')
              'broadcast' in configured_interface and configured_interface.pop('broadcast')
              'hotplug' in configured_interface and configured_interface.pop('hotplug')
              'dnsdomain' in configured_interface and configured_interface.pop('dnsdomain')
              'wpaconf' in configured_interface and configured_interface.pop('wpaconf')
  
          return configured_interfaces
code_tokens: def _get_network_config_from_network_interfaces ( self ) : configured_interfaces = self . etcnetworkinterfaces . get_configurations ( ) if 'lo' in configured_interfaces : configured_interfaces . pop ( 'lo' ) for interface_name , configured_interface in configured_interfaces . items ( ) : if interface_name in self . wifi_interfaces : configured_interface . update ( { 'wifi' : True , 'wifinetwork' : self . wifi_interfaces [ interface_name ] [ 'network' ] } ) elif configured_interface [ 'wpaconf' ] is not None : configured_interface . update ( { 'wifi' : True , 'wifinetwork' : None , } ) else : configured_interface . update ( { 'wifi' : False , 'wifinetwork' : None , } ) for configured_interface in configured_interfaces . values ( ) : 'auto' in configured_interface and configured_interface . pop ( 'auto' ) 'broadcast' in configured_interface and configured_interface . pop ( 'broadcast' ) 'hotplug' in configured_interface and configured_interface . pop ( 'hotplug' ) 'dnsdomain' in configured_interface and configured_interface . pop ( 'dnsdomain' ) 'wpaconf' in configured_interface and configured_interface . pop ( 'wpaconf' ) return configured_interfaces
short_docstring: Get network configuration from /etc/network/interfaces
  This is the default place where network configuration is stored before raspbian stretch
short_docstring_tokens: Get network configuration from / etc / network / interfaces This is the default place where network configuration is stored before raspbian stretch
comment: """
          Get network configuration from /etc/network/interfaces
  
          This is the default place where network configuration is stored before raspbian stretch
  
          Returns:
              dict: configured interfaces::
  
              {
                  interface name (string): {
                      interface (string): interface name,
                      mode (string): interface mode (see etcnetworkinterface MODE_XXX)
                      address (string): ip address
                      netmask (string): netmask address
                      gateway (string): gateway address
                      dnsnameservers (string): dns nameservers
                      wifi (bool): True if interface is wifi
                      wifinetwork (string): name of network if device is connected via wifi
                  },
                  ...
              }
  
          """$SEP$# get configuration$SEP$# remove useless lo interface$SEP$# add more infos$SEP$# add wifi infos$SEP$# interface is wifi and connected$SEP$# interface is wifi but not connected$SEP$# interface is not wifi$SEP$# fix returned config