r/OpenPythonSCAD • u/w0lfwood • Jun 17 '25
osimport() error
openscad built from the latest openscad/openscad git commit. can show a cube just fine via python. but when I try to osimport() an stl, I get an error:
Running Python 3.13.3 without venv.
ERROR: Traceback (most recent call last):
File "<string>", line 5, in <module>
NameError: name 'osimport' is not defined
Execution aborted
my file:
=2
=.1
=
2
Upvotes
2
u/gadget3D Jun 17 '25
osimport did not yet merge to openscad.
please use
https://github.com/pythonscad/pythonscad/
instead to benefit from the full feature set.
1
u/yahbluez Jun 18 '25
I don't know how to tell so i asked grok3. I like your work to embed python into openscad a lot, but every time is see a sample snippet of code it bothers me to see the violation of python coding rules and more important the lost of readability not to see what is from import.
I asked grok3 this question:
[Question]
"In the context of python and pythonic coding styles,
why is "from <libname> import *" considered as bad coding style?"
[Grok3 Answer]
Using from <libname> import * in Python is considered bad coding style for several reasons:
Preferred Alternatives: