use temp dir for boxes.py; remove some useless import in paperfold
extension
This commit is contained in:
parent
bebf4fe61c
commit
aecbd00c1e
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user