From 8c9df6eeb1f800d9130939d3309d1aa492ccce7c Mon Sep 17 00:00:00 2001
From: Wouter Deconinck <wdconinc@gmail.com>
Date: Sat, 21 Dec 2024 14:44:17 -0600
Subject: [PATCH] fix: use shell to write .matplotlibrc

---
 Snakefile | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/Snakefile b/Snakefile
index 14e28f0e..16e1d766 100644
--- a/Snakefile
+++ b/Snakefile
@@ -101,11 +101,14 @@ exec ddsim \
 rule matplotlibrc:
     output:
         ".matplotlibrc",
-    run:
-        with open(output[0], "wt") as fp:
-            fp.write("backend: Agg\n")
-            # interactive mode prevents plt.show() from blocking
-            fp.write("interactive : True\n")
+    shell:
+        """
+cat > {output} <<EOF
+backend: Agg
+# interactive mode prevents plt.show() from blocking
+interactive: True
+EOF
+"""
 
 
 rule org2py:
-- 
GitLab