Please help to achieve output of shell in python
            Asked
            
        
        
            Active
            
        
            Viewed 4,106 times
        
    0
            
            
        - 
                    typo error in above python code line 5. It is hpeesofde.exe instead of xwgen.exe – Harsh Apr 08 '17 at 06:25
- 
                    1Please delete that image and paste your two console I/O blocks in as text. A formatting tool is provided in the toolbar. – halfer Apr 10 '17 at 11:01
1 Answers
1
            
            
        You can hook up stdin and stdout of processes together in python using Popen but it's usually easiest to let shell shell do the work, for example you can:
subprocess.check_output('ls | grep something', shell=True)
Related: How do I use subprocess.Popen to connect multiple processes by pipes?
 
    
    
        Community
        
- 1
- 1
 
    
    
        Trevor Merrifield
        
- 4,541
- 2
- 21
- 24

 
    