def preview_scad(self, filename = 'test.scad', proc = None):
""" Automatically opens an openscad file.
Still slightly WIP, as we're not completely sure on how to
make shell-esque commands from within Python safe.
TODO: Sanitize inputs, implement new way of dealing with proc
Inputs:
filename: the file to open
proc: the process that a previous preview_scad call opened. Allows
the current preview_scad call to close a previous call so you don't
have dozens of OpenSCAD windows open.
"""
if proc:
proc.terminate()
proc = subprocess32.Popen(["openscad", filename])
return proc
Geometry.py 文件源码
python
阅读 29
收藏 0
点赞 0
评论 0
评论列表
文章目录