python里面怎么执行bat文件 20
importosa=r"D:/test.bat"a=os.path.sep.join(a.split(r'/'))printaos.system(a)结果:D:\test...
import os
a= r"D:/test.bat"
a = os.path.sep.join(a.split(r'/'))
print a
os.system(a)
结果:
D:\test.bat
D:\svn\MonitorMongooseLinux\Util>sc stop Tomcat6
[Decode error - output not UTF-8]
[Finished in 0.2s] 展开
a= r"D:/test.bat"
a = os.path.sep.join(a.split(r'/'))
print a
os.system(a)
结果:
D:\test.bat
D:\svn\MonitorMongooseLinux\Util>sc stop Tomcat6
[Decode error - output not UTF-8]
[Finished in 0.2s] 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询