mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-12-27 22:14:57 +03:00
use specified tmpdir when sorting
This commit is contained in:
parent
b99ebb7a19
commit
7927979298
@ -1262,6 +1262,8 @@ def sort_file(filename,tempdir=None):
|
||||
cmd = ['sort', filename]
|
||||
env = {}
|
||||
env['LC_ALL'] = 'C'
|
||||
if tempdir:
|
||||
cmd.extend(['-T',tempdir])
|
||||
|
||||
outfile = NamedTemporaryFile(delete=False,dir=tempdir)
|
||||
sys.stderr.write('LC_ALL=C ' + ' '.join(cmd) + ' > ' + outfile.name + '\n')
|
||||
|
Loading…
Reference in New Issue
Block a user