queryString = ' '.join(sys.argv[3:])
queryString = urllib.parse.quote(queryString)
url = 'https://www.google.com/#q=' + queryString
subprocess.Popen([browser, browserParms, url])
sys.exit()
URL Encode in Windows Batch Script