9 |
9 |
10 import os |
10 import os |
11 |
11 |
12 from eric7 import Globals |
12 from eric7 import Globals |
13 from eric7.EricWidgets.EricApplication import ericApp |
13 from eric7.EricWidgets.EricApplication import ericApp |
|
14 from eric7.SystemUtilities import PythonUtilities |
14 |
15 |
15 SCOPES = ["https://www.googleapis.com/auth/gmail.send"] |
16 SCOPES = ["https://www.googleapis.com/auth/gmail.send"] |
16 CLIENT_SECRET_FILE = "eric_client_secret.json" # secok |
17 CLIENT_SECRET_FILE = "eric_client_secret.json" # secok |
17 TOKEN_FILE = "eric_python_email_send_token.json" # secok |
18 TOKEN_FILE = "eric_python_email_send_token.json" # secok |
18 APPLICATION_NAME = "Eric Python Send Email" |
19 APPLICATION_NAME = "Eric Python Send Email" |
37 def installGoogleAPIPackages(): |
38 def installGoogleAPIPackages(): |
38 """ |
39 """ |
39 Module function to install the required packages to support Google mail. |
40 Module function to install the required packages to support Google mail. |
40 """ |
41 """ |
41 pip = ericApp().getObject("Pip") |
42 pip = ericApp().getObject("Pip") |
42 pip.installPackages(RequiredPackages, interpreter=Globals.getPythonExecutable()) |
43 pip.installPackages( |
|
44 RequiredPackages, interpreter=PythonUtilities.getPythonExecutable() |
|
45 ) |