我在编写ruby脚本的输出时遇到了问题操作系统()
import os
def main():
os.system('\\build.rb -p test > out1.txt')
os.system('\\newRelease.rb -l bat > out2.txt')
if __name__ == '__main__':
main()
当我试图在不传递'>;out1.txt'的情况下执行代码并在cmd上显示输出,但当我传递参数'>;out1.txt'时,它不会将输出写入out1.txt。我希望ruby脚本的输出被重定向到txt文件。在
我会这样做:
相关问题 更多 >
编程相关推荐