添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
儒雅的针织衫  ·  python 报 ...·  3 天前    · 
重感情的伤疤  ·  pathlib --- ...·  2 天前    · 
勤奋的毛衣  ·  v-scroll 指令 | Quasar ...·  5 月前    · 
愉快的沙滩裤  ·  python - ...·  1 年前    · 
开朗的麻辣香锅  ·  Hive metastore ...·  1 年前    · 
  • the output (the list of files) is now in output.txt
  • to read this file, less output.txt
  • to print to screen, add a step to read f :
  • with open("output.txt", "r") as f:
        print(f.read())
    

    Pipe output to another subprocess

  • Make two commands, and then run two subprocesses
  • Pipe out from process 1
  • Pipe in to process 2

  • Make two commands:
  • cmd1 = ['ls'] #list my files
    cmd2 = ['wc', '-l'] #count number of lines
    
    import os
    os.system('echo this is os system') # runs the echo comnmand
    os.system("bash please.sh") # runs please.sh with bash
    os.system("python chips.py") # runs chips.py with python