From 8d36ec9b80c5a4dfb6c81743f3e7ab73780b12f1 Mon Sep 17 00:00:00 2001 From: Graeme Winter Date: Mon, 25 Nov 2024 16:17:08 +0000 Subject: [PATCH] Bugfix: stdout output for tqdm (#773) Bugfix: stdout output for tqdm --- newsfragments/773.bugfix | 1 + src/dxtbx/model/experiment_list.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 newsfragments/773.bugfix diff --git a/newsfragments/773.bugfix b/newsfragments/773.bugfix new file mode 100644 index 000000000..a9df61b72 --- /dev/null +++ b/newsfragments/773.bugfix @@ -0,0 +1 @@ +``dials.import``: force tqdm output to stdout not stderr as default \ No newline at end of file diff --git a/src/dxtbx/model/experiment_list.py b/src/dxtbx/model/experiment_list.py index 6f3590c5f..a2f62f4b1 100644 --- a/src/dxtbx/model/experiment_list.py +++ b/src/dxtbx/model/experiment_list.py @@ -677,7 +677,7 @@ def from_filenames( format_kwargs = {} if os.isatty and len(filenames) > 1: - filename_iter = tqdm(to_process, total=len(filenames)) + filename_iter = tqdm(to_process, total=len(filenames), file=sys.stdout) else: filename_iter = to_process