From 7f9e819b50094de93821a9cb62a3853e30e72ab1 Mon Sep 17 00:00:00 2001 From: Anders Jonsson Date: Thu, 27 Jun 2024 19:09:54 +0200 Subject: [PATCH] Export histogram: fix blank lines on Windows For the Python 3 case in issue #6096 following the instructions of zjw and the Python 3 manual. --- plug-ins/python/histogram-export.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plug-ins/python/histogram-export.py b/plug-ins/python/histogram-export.py index 137f73c53a..928775d7aa 100644 --- a/plug-ins/python/histogram-export.py +++ b/plug-ins/python/histogram-export.py @@ -106,7 +106,7 @@ def histogram_export(procedure, img, layers, gio_file, channels_gimp += [Gimp.HistogramChannel.ALPHA] try: - with open(gio_file.get_path(), "wt") as hfile: + with open(gio_file.get_path(), "wt", newline="") as hfile: writer = csv.writer(hfile) histo_proc = Gimp.get_pdb().lookup_procedure('gimp-drawable-histogram') histo_config = histo_proc.create_config()