Common Lisp: Launch subprocess with different working directory than lisp process

前端 未结 3 1173
面向向阳花
面向向阳花 2021-01-14 02:08

Suppose I have a directory A, and subdirectory B. I cd into A and launch lisp. In that lisp process, I would like to launch a Python subprocess where Python sees B as its cu

3条回答
  •  旧巷少年郎
    2021-01-14 02:57

    I dont know what lisp is but could this work?

      import subprocess
      subprocess.Popen('python myscript.py', cwd='B')
    

    http://docs.python.org/library/subprocess.html

提交回复
热议问题