Last active
          June 27, 2022 09:05 
        
      - 
      
- 
        Save msymt/acad5b4aa567dd7f2c0afe50f2e665a6 to your computer and use it in GitHub Desktop. 
    python上であるファイルの中身をoutputにリダイレクトしたいとき
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | import subprocess | |
| # $cat input > output | |
| subprocess.run(['cat'], stdin=open("input", 'r'), stdout=open("output", 'a')) | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
            
こっちの方が早い?