I would like process a file line by line. However I need to sort it first which I normally do by piping:
sort --key=1,2 data |./script.py.  
What's the best to call sort from within python? Searching online I see subprocess or the sh module might be possibilities?  I don't want to read the file into memory and sort in python as the data is very big.
 
     
     
     
     
    