Import data from Enigmail to pEp for Thunderbird
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

24 lines
812 B

# coding=UTF-8
import os
# from _winreg import OpenKey, HKEY_LOCAL_MACHINE, QueryValueEx
# path = r"Software\Clients\Mail\Mozilla Thunderbird\InstallInfo"
# with OpenKey(HKEY_LOCAL_MACHINE, path) as key:
# keyval = QueryValueEx(key, "ReinstallCommand")
# regstring = keyval[0]
# path_start = regstring.find('\"')
# path_end = regstring.find('\"', path_start+1)
# path = regstring[path_start+1:path_end]
# uninstall_path = os.path.split(path)[0]
# thunderbird_base = os.path.dirname(uninstall_path)
def gpg_executable(thunderbird_base):
for p in os.environ["PATH"].split(os.pathsep):
if 'Gpg4win' in p:
return os.path.join(p, 'gpg.exe')
thunderbird_base = os.path.join(os.environ['APPDATA'], 'Thunderbird')
per_user_directory = os.path.join(os.environ['LOCALAPPDATA'], 'pEp')