subprocess.call env var

后端 未结 1 754
孤城傲影
孤城傲影 2020-12-11 15:37

I\'m using Popen because I need the env, like this:

Popen(
    [\"boto-rsync\", \"...\"],
    env={\"PATH\":\"/Library/Frameworks/Python.framework/Versions/2         


        
相关标签:
1条回答
  • 2020-12-11 16:02

    You can use env with call in the exact same way as with popen:

    subprocess.call(
        ["boto-rsync", "..."],
        env={"PATH":"/Library/Frameworks/Python.framework/Versions/2.7/bin/"},
        )
    
    0 讨论(0)
提交回复
热议问题