use temp dir for boxes.py; remove some useless import in paperfold

extension
This commit is contained in:
Mario Voigt 2021-12-02 11:51:39 +01:00
parent bebf4fe61c
commit aecbd00c1e
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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