From aecbd00c1e29231f7c59ac75622adc2d4c6b1e1e Mon Sep 17 00:00:00 2001 From: Mario Voigt Date: Thu, 2 Dec 2021 11:51:39 +0100 Subject: [PATCH] use temp dir for boxes.py; remove some useless import in paperfold extension --- extensions/fablabchemnitz/boxes.py/boxes_proxy.py | 3 ++- extensions/fablabchemnitz/paperfold/paperfold.py | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/fablabchemnitz/boxes.py/boxes_proxy.py b/extensions/fablabchemnitz/boxes.py/boxes_proxy.py index bed58d35..d6518a13 100644 --- a/extensions/fablabchemnitz/boxes.py/boxes_proxy.py +++ b/extensions/fablabchemnitz/boxes.py/boxes_proxy.py @@ -16,6 +16,7 @@ import inkex import sys import os from lxml import etree +import tempfile class boxesPyWrapper(inkex.GenerateExtension): @@ -31,7 +32,7 @@ class boxesPyWrapper(inkex.GenerateExtension): pass #ignore duplicate id arg def generate(self): - box_file = "box.svg" + box_file = os.path.join(tempfile.gettempdir(), "box.svg") if os.path.exists(box_file): os.remove(box_file) #remove previously generated box file at the beginning diff --git a/extensions/fablabchemnitz/paperfold/paperfold.py b/extensions/fablabchemnitz/paperfold/paperfold.py index bc2ed183..c1ef67a6 100644 --- a/extensions/fablabchemnitz/paperfold/paperfold.py +++ b/extensions/fablabchemnitz/paperfold/paperfold.py @@ -2,7 +2,6 @@ import math import inkex from inkex import Transform, TextElement, Tspan, Color, Circle, PathElement, CubicSuperPath -import tempfile import os import random import numpy as np