src/eric7/EricNetwork/EricGoogleMailHelpers.py

branch
eric7
changeset 10926
9ef616cd220d
parent 10439
21c28b0f9e41
child 10928
46651e194fbe
equal deleted inserted replaced
10925:22c3928a1ab5 10926:9ef616cd220d
7 Module implementing some helpers for Google mail. 7 Module implementing some helpers for Google mail.
8 """ 8 """
9 9
10 import os 10 import os
11 11
12 from eric7 import Globals 12 from eric7 import EricUtilities
13 from eric7.EricWidgets.EricApplication import ericApp 13 from eric7.EricWidgets.EricApplication import ericApp
14 from eric7.SystemUtilities import PythonUtilities 14 from eric7.SystemUtilities import PythonUtilities
15 15
16 SCOPES = ["https://www.googleapis.com/auth/gmail.send"] 16 SCOPES = ["https://www.googleapis.com/auth/gmail.send"]
17 CLIENT_SECRET_FILE = "eric_client_secret.json" # secok 17 CLIENT_SECRET_FILE = "eric_client_secret.json" # secok
30 Module function to check, if the client secret file has been installed. 30 Module function to check, if the client secret file has been installed.
31 31
32 @return flag indicating, that the credentials file is there 32 @return flag indicating, that the credentials file is there
33 @rtype bool 33 @rtype bool
34 """ 34 """
35 return os.path.exists(os.path.join(Globals.getConfigDir(), CLIENT_SECRET_FILE)) 35 return os.path.exists(
36 os.path.join(EricUtilities.getConfigDir(), CLIENT_SECRET_FILE)
37 )
36 38
37 39
38 def installGoogleAPIPackages(): 40 def installGoogleAPIPackages():
39 """ 41 """
40 Module function to install the required packages to support Google mail. 42 Module function to install the required packages to support Google mail.

eric ide

mercurial