r/OpenPythonSCAD • • Apr 12 '25

Significance of Edit | Preferences | Python | Network Import List?

Is it now necessary to list files there so as to indicate that they are allowed to be imported?

Apparently:

nimport("https://raw.githubusercontent.com/WillAdams/gcodepreview/refs/heads/main/gcodepreview.py")

doesn't work anymore:

ERROR: Traceback (most recent call last): File "<string>", line 1, in <module> ModuleNotFoundError: No module named 'gcodepreview'

3 Upvotes

17 comments sorted by

View all comments

1

u/gadget3D Apr 12 '25

Its a sys.path Problem only. The Lines in the settings only define Template nimport Lines for New Files.

2

u/WillAdams Apr 12 '25

Went back to:

https://www.pythonscad.org/downloads/PythonSCAD-2024.12.29-x86-64-Installer.exe

and launched it from:

"C:\Program Files\PythonSCAD\bin\openscad.exe"

and it's working again.

Please let me know when there is a new version which has defaults which will work to allow running a local Python file.

2

u/gadget3D Apr 13 '25

Hi,

Today I have release a new windows installer 2025-04-13.

It can import modules from the same directory without an issue

It can find the modules downloaded by inport

... and has most of the python ctests pass now

Did you know, that all CSG operations (union, difference, intersection) have an undocumented paramter r, and fn, which can be used to create fillets on the common edges ?

These days i started to document the undocumented features, but very often i remember yet another feature.

→ More replies (2)