def posix_dythread(inf,outf, dyalog=b"dyalog"):
# find the path to IPC.dyalog
ipcpath=to_bytes(os.path.dirname(SCRIPTFILE))+b'/IPC.dyalog'
# find the path, Py.dyalog should be in the same folder
path=to_bytes(os.path.dirname(SCRIPTFILE))+b'/Py.dyalog'
# Run the Dyalog instance in this thread
p=Popen([dyalog, b'-script'], stdin=PIPE, preexec_fn=os.setpgrp)
s=script%(pystr(ipcpath),pystr(path),inf,outf)
p.communicate(input=s.encode('utf8'))
评论列表
文章目录