Skip to content

use() & include() fail if solidpython isn't imported with 'from solid import *' #20

Closed

Description

@etjones

The following code fails, but adding from solid import * to get all of solidpython.py into the current namespace fixes things. :

#! /usr/bin/python
# -*- coding: UTF-8 -*-

import solid
# from solid import * # *** When this line is commented out, solid.use() fails. 
                    # *** Import all of solid into this module's namespace, and success

def test_scad_include():
    a = solid.cube(10)
    solid.use( "examples/scad_to_include.scad") # Path relative to solidpython.py
    a += steps( 3)
    return a

if __name__ == '__main__':
    a = test_scad_include()    
    solid.scad_render_to_file( a)

Activity

  1. ghost assigned on Jan 17, 2014
  2. added a commit that references this issue on Jan 17, 2014
    46cc89f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions