diff --git a/swash/processing/read_swash.py b/swash/processing/read_swash.py index 26a3014..722ffec 100644 --- a/swash/processing/read_swash.py +++ b/swash/processing/read_swash.py @@ -14,7 +14,7 @@ class ReadSwash: @classmethod def read_nohead(cls, path): - with tempfile.SpooledTemporaryFile() as tmpfile: + with tempfile.NamedTemporaryFile(dir=path.parent) as tmpfile: with open(path) as file: subprocess.run(("tr", "-d", "\n"), stdin=file, stdout=tmpfile) tmpfile.seek(0)