Geometry.py 文件源码

python
阅读 29 收藏 0 点赞 0 评论 0

项目:Simple-User-Input-Sculpture-Generation 作者: ClaireKincaid 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号