RunDyalog.py 文件源码

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

项目:pynapl 作者: marinuso 项目源码 文件源码
def win_dythread(dyalog, cygwin=False):

    startupinfo = None
    preexec_fn = None

    if not cygwin:
        # not cygwin 
        # hide the window
        # imported here because STARTUPINFO only exists on Windows
        import subprocess
        startupinfo = subprocess.STARTUPINFO()
        startupinfo.dwflags = subprocess.STARTF_USESHOWWINDOW
        startupinfo.wShowWindow = 0
    elif cygwin:
        # cygwin: we need to setpgrp like on Linux or Dyalog will crash
        preexec_fn = os.setpgrp 


    path=to_bytes(os.path.dirname(SCRIPTFILE))+b'/WinPySlave.dyapp'
    if cygwin: path=cyg_convert_path(path, b"--windows") 

    dyalog = pystr(dyalog)
    arg = pystr(b'DYAPP=' + path)

    x=Popen([dyalog, arg], startupinfo=startupinfo,
          preexec_fn=preexec_fn)
    x.communicate()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号