【发布时间】:2015-08-18 16:31:19
【问题描述】:
我有一个用于从 Windows 命令行进行部署的命令。现在我需要从外部 python3.4 脚本运行相同的脚本。
命令是C:\Program Files (x86)\MSBuild\12.0\Bin\msbuild "D:\WebService\WebService.sln" /p:DeployOnBuild=true /p:PublishProfile="D:\WebService\Properties\PublishProfiles\MyDeployment.pubxml" /p:AllowUntrustedCertificate=true /p:UserName=name /p:Password=PASSWORD。
我怎样才能做到这一点。我试过 subprocess 。但它不起作用。请帮帮我。
【问题讨论】:
-
I tried subprocess. But it's not working -
@inspectorG4dget:我试过
subprocess.call("C:\Program Files (x86)\MSBuild\12.0\Bin\msbuild "D:\WebService\WebService.sln" /p:DeployOnBuild=true /p:PublishProfile="D:\WebService\Properties\PublishProfiles\MyDeployment.pubxml" /p:AllowUntrustedCertificate=true /p:UserName=name /p:Password=PASSWORD")。它给了我语法错误。
标签: python windows cmd subprocess python-3.4