mirror of
https://github.com/nophead/NopSCADlib.git
synced 2025-08-04 22:47:25 +02:00
Fix for Python 2
This commit is contained in:
@@ -24,8 +24,8 @@ from __future__ import print_function
|
|||||||
|
|
||||||
import subprocess, sys
|
import subprocess, sys
|
||||||
|
|
||||||
def run(*args, silent = False):
|
def _run(args, silent):
|
||||||
cmd = ["openscad"] + list(args)
|
cmd = ["openscad"] + args
|
||||||
if not silent:
|
if not silent:
|
||||||
for arg in cmd:
|
for arg in cmd:
|
||||||
print(arg, end=" ")
|
print(arg, end=" ")
|
||||||
@@ -37,3 +37,9 @@ def run(*args, silent = False):
|
|||||||
print(line[:-1])
|
print(line[:-1])
|
||||||
if rc:
|
if rc:
|
||||||
sys.exit(rc)
|
sys.exit(rc)
|
||||||
|
|
||||||
|
def run(*args):
|
||||||
|
_run(list(args), False)
|
||||||
|
|
||||||
|
def run_silent(*args):
|
||||||
|
_run(list(args), True);
|
||||||
|
@@ -67,7 +67,7 @@ def plateup(target, part_type):
|
|||||||
log_name = 'openscad.log'
|
log_name = 'openscad.log'
|
||||||
else:
|
else:
|
||||||
log_name = 'openscad.echo'
|
log_name = 'openscad.echo'
|
||||||
openscad.run("-D$bom=1", "-o", log_name, src_file, silent = True)
|
openscad.run_silent("-D$bom=1", "-o", log_name, src_file)
|
||||||
#
|
#
|
||||||
# Add the files on the BOM to the used list
|
# Add the files on the BOM to the used list
|
||||||
#
|
#
|
||||||
|
Reference in New Issue
Block a user