fixed boxes.py to work on both linux and windows

This commit is contained in:
Mario Voigt 2021-04-29 14:51:31 +02:00
parent b5b2179c8c
commit 4086288044
3 changed files with 1 additions and 8 deletions
extensions/fablabchemnitz/boxes.py

View File

@ -1,4 +0,0 @@
#!/usr/bin/python3
# EASY-INSTALL-SCRIPT: 'boxes==0.9','boxes'
__requires__ = 'boxes==0.9'
__import__('pkg_resources').run_script('boxes==0.9', 'boxes')

0
extensions/fablabchemnitz/boxes.py/boxes.exe Normal file → Executable file
View File

View File

@ -35,10 +35,7 @@ class boxesPyWrapper(inkex.GenerateExtension):
if os.path.exists(box_file):
os.remove(box_file) #remove previously generated box file at the beginning
if os.name == "nt":
cmd = "boxes.exe"
else:
cmd = "./boxes"
cmd = "boxes" #boxes.exe in this local dir (or if present in %PATH%), or boxes from $PATH in linux
for arg in vars(self.options):
if arg != "output" and arg != "ids" and arg != "selected_nodes":
#inkex.utils.debug(str(arg) + " = " + str(getattr(self.options, arg)))