RunDyalog.py 文件源码

python
阅读 20 收藏 0 点赞 0 评论 0

项目:pynapl 作者: marinuso 项目源码 文件源码
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'))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号