Update ESP32Driver.py

Added some todos
This commit is contained in:
Eric Yu 2022-08-17 11:20:41 -07:00 committed by GitHub
parent 2170c05b05
commit d680b62810
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -1,5 +1,5 @@
# This is a sample Python script. # This is a sample Python script.
import requests import os, requests # TODO: we don't have 'requests' package build-in, should we use use urllib.request instead?
from zipfile import ZipFile from zipfile import ZipFile
URL = "https://www.silabs.com/documents/public/software/CP210x_Universal_Windows_Driver.zip" URL = "https://www.silabs.com/documents/public/software/CP210x_Universal_Windows_Driver.zip"
@ -8,5 +8,5 @@ response = requests.get(URL)
open('ESP32driver', 'wb').write(response.content) open('ESP32driver', 'wb').write(response.content)
# need to change user destination figure out how to get it to downloads # need to change user destination figure out how to get it to downloads
with ZipFile('ESP32driver', 'r') as zipObj: with ZipFile('ESP32driver', 'r') as zipObj:
zipObj.extractall('C:\\Users\\akash\\Downloads\\ESP32driver') zipObj.extractall(os.path.join(os.path.expanduser("~"), "Downloads", "ESP32driver"))
# TODO: after extract the file, run the .inf file in it to actually install the driver