I have a Python file which calls a case sensitive sorting routine provided by the underlying OS. This program was originally tested in Unix.
The code fragment looks as follows:
def sort(path, filename, args=''):
s = 'LC_ALL=C sort -S 50% --parallel=4 {0} {1} -o {1}'
status = subprocess.call(s.format(args, os.path.join(path, filename)), shell=True)
if status != 0:
raise Exception('unable to sort file: {}'.format(filename))
However, running this program in Windows throws the error
"LC_ALL=C :Command not found"
and the default "sort" routine in Windows is case sensitive.
Is there any corresponding case sensitive sort routine that I can call in Windows or modify this command to remove this issue?