Activate virtualenv via os.system()

前端 未结 4 801
一生所求
一生所求 2020-12-10 20:33

I\'m writing a Python-based shell script to boilerplate a Django app with virtualenv, pip, and fabric. Should be straightforward enough, but it appears that I\'m not able to

4条回答
  •  无人及你
    2020-12-10 20:59

    Each call to os.system runs the command in a new subshell, which has the same properties as the original python process.

    Try putting the commands into one string separated by semicolons.

提交回复
热议问题