How to grep full trace log based on a keyword like 'Outofmemory' in Python as I tried readline() to grep the line instead of entire log trace. Share the snippet, please.
            Asked
            
        
        
            Active
            
        
            Viewed 69 times
        
    0
            
            
         
    
    
        David Jones
        
- 4,766
- 3
- 32
- 45
 
    
    
        Wars
        
- 1
- 
                    If you know that the stack is about 10 lines, use the "after" parameter: `grep Outofmemory -A 10 your_trace.log` https://stackoverflow.com/a/9083/2375207 – nicolallias Apr 08 '19 at 13:17
- 
                    Thr number of lines is differs in each error.pls help to grep the full trace through python. – Wars Apr 08 '19 at 14:41