I see two answers with good qualities, each with a small flaw, so I will give my take on it:
Try os.path.exists, and consider os.makedirs...
Try the xlrd library.
From what I can see from your comment, something like the snippet below might do the trick. I'm assuming here that...
You can add system variable by
(by doing this you can use easy_install without specifying path)
1 Clicking on Properties of My Computer
2 Then chose Advanced...
Now that you have your SMTP connection set up and authorized your app with Google, you can finally use Python to send email with Gmail
The line of code that throws Could not run curl-config: [Errno 2] No such file or directory” when installing pycurl on Linux, should inform the user as to remedy - a pre-requisite, rather than leaving them to test their google skills.




![“Could not run curl-config: [Errno 2] No such file or directory” when installing pycurl installcurlError](https://www.iodocs.com/wp-content/uploads/2018/08/installcurlError-534x186.jpg)