您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 

12 行
356 B

  1. import os.path
  2. import subprocess
  3. home = os.path.expanduser("~")
  4. def mailpasswd(acct):
  5. acct = os.path.basename(acct)
  6. path = "%s/.config/mutt/credentials/%s.gpg" % (home,acct)
  7. args = ["gpg", "--use-agent", "--quiet", "--batch", "-d", path]
  8. try:
  9. return subprocess.check_output(args).strip()
  10. except subprocess.CalledProcessError:
  11. return ""