2
sys.path.insert(0, "../src")
4
import GnuPGInterface, thread
7
gnupg = GnuPGInterface.GnuPG()
8
gnupg.options.meta_interactive = 0
9
gnupg.passphrase = "foobar"
11
p1 = gnupg.run(['--symmetric'], create_fhs=['stdin', 'stdout'])
13
if os.fork() == 0: # child
14
p1.handles['stdin'].write("hello, world!")
15
p1.handles['stdin'].close()
18
p1.handles['stdin'].close()
19
s = p1.handles['stdout'].read()
20
p1.handles['stdout'].close()
26
thread.start_new_thread(tmp, (a,))