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.
|
# coding=UTF-8
|
|
|
|
|
|
import os
|
|
|
|
|
|
class GnuPGNotFound(LookupError):
|
|
pass
|
|
|
|
|
|
def which(program):
|
|
fpath, fname = os.path.split(program)
|
|
if fpath:
|
|
if os.path.isfile(program):
|
|
return program
|
|
else:
|
|
for path in os.environ["PATH"].split(os.pathsep):
|
|
exe_file = os.path.join(path, program)
|
|
if os.path.isfile(exe_file):
|
|
return exe_file
|
|
return None
|
|
|