我想创建一个运行器来激活虚拟环境并在其中运行python代码。以下配置不起作用:
// Create a custom Cloud9 runner - similar to the Sublime build system
// For more information see https://docs.c9.io/custom_runners.html
{
"cmd" : ["source /home/p2/bin/activate && python", "$file", "$args"],
"info" : "Started $project_path$file_name",
"env" : {},
"selector" : "*.py"
}
>我找到了解决方案:)
// Create a custom Cloud9 runner - similar to the Sublime build system
// For more information see https://docs.c9.io/custom_runners.html
{
"cmd" : ["/home/p2/bin/python", "$file", "$args"],
"info" : "Started $project_path$file_name",
"env" : {},
"selector" : "^*\.py$"
}
您也可以通过 bash -c 管道传输命令