title: python script for RaspberryPi to connect wifi automatically
body: <p>I want to operate a WiFi dongle with RaspberryPi, (it's like a CPU without built-in WiFi). I need to write a python script which automatically scan for WiFi networks and a connection need to be automatically established with known SSID and password.</p>
  
  <p>This mean that I need to provide the password for the WiFi network from a file, and the
  remaining thing is to do the scanning and connecting automatically.</p>
  
  <p>I read a file from the Web which contains WiFi SSID name and password.</p>
  
  <p>I need to write a script which scan and list current networds and match it to the SSID from the file and further to automatically create the connection to this known network.</p>
  
  <p>RaspberryPi OS: Rasbian</p>