GH
gene heskett
Sat, May 10, 2025 1:21 AM
On 5/9/25 15:37, Guenther Sohler via Discuss wrote:
I see your vision, Torsten,
There are just 2 obstacles:
Virtual Environments is nothing which I am familiar with(probably neither
you), I am not the right person to drive that because I am missing the
intent there.
As for the continued integration: I see further features which meet the
OpenSCAD "Standards" of Maturity and Safety.
However I feel the next step of integration is to improve the
accessibility of python in openscad and this is windows platforms.
Torsten: While I realize the market size is extremely out of balance in
favor of windows, please do not forget that OpenSCAD is also a linux
application.
I am happy to share my MINGW+MXE compilation setup but right now CMakeLists
of openscad+pythonscad is too different/obfuscated.
This is why I try to take small steps here.
The PR i am referring to is: https://github.com/openscad/openscad/pull/5697
which would approximately be midway.
C U :)
On Fri, May 9, 2025 at 8:48 PM Torsten Paul via Discuss <
discuss@lists.openscad.org> wrote:
On 09.05.25 18:36, Todd Allen via Discuss wrote:
Please let us know where there are the biggest stumbling blocks so we
can set priorities correctly.
In my view that is:
- Support for virtual environments
- Continued integration into OpenSCAD
ciao,
Torsten.
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
Cheers, Gene Heskett, CET.
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.
On 5/9/25 15:37, Guenther Sohler via Discuss wrote:
> I see your vision, Torsten,
>
> There are just 2 obstacles:
>
> Virtual Environments is nothing which I am familiar with(probably neither
> you), I am not the right person to drive that because I am missing the
> intent there.
>
> As for the continued integration: I see further features which meet the
> OpenSCAD "Standards" of Maturity and Safety.
> However I feel the next step of integration is to improve the
> accessibility of python in openscad and this is windows platforms.
Torsten: While I realize the market size is extremely out of balance in
favor of windows, please do not forget that OpenSCAD is also a linux
application.
> I am happy to share my MINGW+MXE compilation setup but right now CMakeLists
> of openscad+pythonscad is too different/obfuscated.
> This is why I try to take small steps here.
> The PR i am referring to is: https://github.com/openscad/openscad/pull/5697
> which would approximately be midway.
>
>
> C U :)
>
>
>
> On Fri, May 9, 2025 at 8:48 PM Torsten Paul via Discuss <
> discuss@lists.openscad.org> wrote:
>
>> On 09.05.25 18:36, Todd Allen via Discuss wrote:
>>> Please let us know where there are the biggest stumbling blocks so we
>>> can set priorities correctly.
>> In my view that is:
>> * Support for virtual environments
>> * Continued integration into OpenSCAD
>>
>> ciao,
>> Torsten.
>> _______________________________________________
>> OpenSCAD mailing list
>> To unsubscribe send an email to discuss-leave@lists.openscad.org
>>
>
> _______________________________________________
> OpenSCAD mailing list
> To unsubscribe send an email to discuss-leave@lists.openscad.org
Cheers, Gene Heskett, CET.
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.
- Louis D. Brandeis
TP
Torsten Paul
Sun, May 11, 2025 7:30 PM
On 10.05.25 03:21, gene heskett via Discuss wrote:
Torsten: While I realize the market size is extremely out of balance in
favor of windows, please do not forget that OpenSCAD is also a linux
application.
Poking the wrong person here :-). I'm running Linux on my personal
systems since Debian 1.3 (bo, 1997), ignoring the even earlier
Slackware from 23 floppy disk dances. So I'm certainly not going to
forget Linux.
But back to the topic of virtual environments. It would be useful
to hear from people who want to use OpenSCAD + Python. What's the
view on this?
Right now some official OpenSCAD nightly builds have basic
support for creating a virtual environment that can be used to
install external package for use in OpenSCAD.
(Menu: File -> Python -> Create Virtual Environment ; Select an
empty folder ; Wait for the "Success" popup ; Restart OpenSCAD)
Status:
- AppImage: Works for me :-), may have issues on some distros
- Flatpak: should work wherever the flatpak itself works
- Snap: nope, not working yet, all tries so far failed
- Distro Packages: untested, probably needs some minor changes
- Windows: nope, no Python yet
- MacOS: nope, no Python yet
ciao,
Torsten.
On 10.05.25 03:21, gene heskett via Discuss wrote:
> Torsten: While I realize the market size is extremely out of balance in
> favor of windows, please do not forget that OpenSCAD is also a linux
> application.
Poking the wrong person here :-). I'm running Linux on my personal
systems since Debian 1.3 (bo, 1997), ignoring the even earlier
Slackware from 23 floppy disk dances. So I'm certainly not going to
forget Linux.
But back to the topic of virtual environments. It would be useful
to hear from people who want to use OpenSCAD + Python. What's the
view on this?
Right now *some* official OpenSCAD nightly builds have basic
support for creating a virtual environment that can be used to
install external package for use in OpenSCAD.
(Menu: File -> Python -> Create Virtual Environment ; Select an
empty folder ; Wait for the "Success" popup ; Restart OpenSCAD)
Status:
- AppImage: Works for me :-), may have issues on some distros
- Flatpak: *should* work wherever the flatpak itself works
- Snap: nope, not working yet, all tries so far failed
- Distro Packages: untested, probably needs some minor changes
- Windows: nope, no Python yet
- MacOS: nope, no Python yet
ciao,
Torsten.
WF
William F. Adams
Sun, May 11, 2025 8:27 PM
But back to the topic of virtual environments. It would be useful
to hear from people who want to use OpenSCAD + Python. What's the
view on this?
Right now some official OpenSCAD nightly builds have basic
support for creating a virtual environment that can be used to
install exter package for use in OpenSCAD.
(Menu: File -> Python -> Create Virtual Environment ; Select an
empty folder ; Wait for the "Success" popup ; Restart OpenSCAD)
Status:
- AppImage: Works for me :-), may have issues on some distros
- Flatpak: should work wherever the flatpak itself works
- Snap: nope, not working yet, all tries so far failed
- Distro Packages: untested, probably needs some minor changes
- Windows: nope, no Python yet
- MacOS: nope, no Python yet
Windows user here, and for a long while, (Open)PythonSCAD has "just worked", and whatever changes are made, I want that to continue to be the case --- every time virtual environments come up for a Python project, I quickly find that things stop working --- it can't just be me since there's an XKCD on it:
https://xkcd.com/1987/
So please, whatever is done, have a standard/default which is simple and well-documented, so that pretty much anyone can implement it.
William
On Sunday, May 11, 2025 at 03:31:20 PM EDT, Torsten Paul via Discuss <discuss@lists.openscad.org> wrote:
>But back to the topic of virtual environments. It would be useful
>to hear from people who want to use OpenSCAD + Python. What's the
>view on this?
>Right now *some* official OpenSCAD nightly builds have basic
>support for creating a virtual environment that can be used to
>install exter package for use in OpenSCAD.
>(Menu: File -> Python -> Create Virtual Environment ; Select an
>empty folder ; Wait for the "Success" popup ; Restart OpenSCAD)
>Status:
>- AppImage: Works for me :-), may have issues on some distros
>- Flatpak: *should* work wherever the flatpak itself works
>- Snap: nope, not working yet, all tries so far failed
>- Distro Packages: untested, probably needs some minor changes
>- Windows: nope, no Python yet
>- MacOS: nope, no Python yet
Windows user here, and for a long while, (Open)PythonSCAD has "just worked", and whatever changes are made, I want that to continue to be the case --- every time virtual environments come up for a Python project, I quickly find that things stop working --- it can't just be me since there's an XKCD on it:
https://xkcd.com/1987/
So please, whatever is done, have a standard/default which is simple and well-documented, so that pretty much anyone can implement it.
William
TP
Torsten Paul
Sun, May 11, 2025 8:39 PM
On 11.05.25 22:27, William F. Adams wrote:
Venv is exactly the (one) solution against that mess.
Sorry, but I'm reading that xkcd quite differently. The
title seems to confirm my interpretation:
"The Python environmental protection agency wants to
seal it in a cement chamber, with pictorial messages
to future civilizations warning them about the danger
of using sudo to install random Python packages."
Also note how virtual env does not appear anywhere in
the picture or in the description.
ciao,
Torsten.
On 11.05.25 22:27, William F. Adams wrote:
> https://xkcd.com/1987/
Venv is *exactly* the (one) solution *against* that mess.
Sorry, but I'm reading that xkcd quite differently. The
title seems to confirm my interpretation:
"The Python environmental protection agency wants to
seal it in a cement chamber, with pictorial messages
to future civilizations warning them about the danger
of using sudo to install random Python packages."
Also note how virtual env does not appear anywhere in
the picture or in the description.
ciao,
Torsten.
ER
edmund ronald
Sun, May 11, 2025 8:39 PM
I see that python+openscad has inevitably become a debate topic.
I see inevitably because openscad started with a private language, and
people thought why have that when we know python already.
The difficulty seems to be that people want a full python environment, not
simply python scripting syntax inside the software.
A complete Python seems completely incompatible with the idea of OpenScad
as a drop-in software package.
I would urge the designers and maintainers of OpenScad to separate the
ideas of Python scripting/syntax support and complete Python support.
Edmund
On Sun, May 11, 2025 at 10:27 PM William F. Adams via Discuss <
discuss@lists.openscad.org> wrote:
But back to the topic of virtual environments. It would be useful
to hear from people who want to use OpenSCAD + Python. What's the
view on this?
Right now some official OpenSCAD nightly builds have basic
support for creating a virtual environment that can be used to
install exter package for use in OpenSCAD.
(Menu: File -> Python -> Create Virtual Environment ; Select an
empty folder ; Wait for the "Success" popup ; Restart OpenSCAD)
Status:
- AppImage: Works for me :-), may have issues on some distros
- Flatpak: should work wherever the flatpak itself works
- Snap: nope, not working yet, all tries so far failed
- Distro Packages: untested, probably needs some minor changes
- Windows: nope, no Python yet
- MacOS: nope, no Python yet
Windows user here, and for a long while, (Open)PythonSCAD has "just
worked", and whatever changes are made, I want that to continue to be the
case --- every time virtual environments come up for a Python project, I
quickly find that things stop working --- it can't just be me since there's
an XKCD on it:
https://xkcd.com/1987/
So please, whatever is done, have a standard/default which is simple and
well-documented, so that pretty much anyone can implement it.
William
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
I see that python+openscad has inevitably become a debate topic.
I see inevitably because openscad started with a private language, and
people thought why have that when we know python already.
The difficulty seems to be that people want a full python environment, not
simply python scripting syntax inside the software.
A complete Python seems completely incompatible with the idea of OpenScad
as a drop-in software package.
I would urge the designers and maintainers of OpenScad to separate the
ideas of Python scripting/syntax support and complete Python support.
Edmund
On Sun, May 11, 2025 at 10:27 PM William F. Adams via Discuss <
discuss@lists.openscad.org> wrote:
> On Sunday, May 11, 2025 at 03:31:20 PM EDT, Torsten Paul via Discuss <
> discuss@lists.openscad.org> wrote:
>
> >But back to the topic of virtual environments. It would be useful
> >to hear from people who want to use OpenSCAD + Python. What's the
> >view on this?
>
> >Right now *some* official OpenSCAD nightly builds have basic
> >support for creating a virtual environment that can be used to
> >install exter package for use in OpenSCAD.
> >(Menu: File -> Python -> Create Virtual Environment ; Select an
> >empty folder ; Wait for the "Success" popup ; Restart OpenSCAD)
>
> >Status:
> >- AppImage: Works for me :-), may have issues on some distros
> >- Flatpak: *should* work wherever the flatpak itself works
> >- Snap: nope, not working yet, all tries so far failed
> >- Distro Packages: untested, probably needs some minor changes
> >- Windows: nope, no Python yet
> >- MacOS: nope, no Python yet
>
>
> Windows user here, and for a long while, (Open)PythonSCAD has "just
> worked", and whatever changes are made, I want that to continue to be the
> case --- every time virtual environments come up for a Python project, I
> quickly find that things stop working --- it can't just be me since there's
> an XKCD on it:
>
> https://xkcd.com/1987/
>
> So please, whatever is done, have a standard/default which is simple and
> well-documented, so that pretty much anyone can implement it.
>
> William
> _______________________________________________
> OpenSCAD mailing list
> To unsubscribe send an email to discuss-leave@lists.openscad.org
>
JD
John David
Sun, May 11, 2025 8:44 PM
Any post that includes an XKCD references is a SCORE ;-)
On Sun, May 11, 2025 at 4:27 PM William F. Adams via Discuss <
discuss@lists.openscad.org> wrote:
But back to the topic of virtual environments. It would be useful
to hear from people who want to use OpenSCAD + Python. What's the
view on this?
Right now some official OpenSCAD nightly builds have basic
support for creating a virtual environment that can be used to
install exter package for use in OpenSCAD.
(Menu: File -> Python -> Create Virtual Environment ; Select an
empty folder ; Wait for the "Success" popup ; Restart OpenSCAD)
Status:
- AppImage: Works for me :-), may have issues on some distros
- Flatpak: should work wherever the flatpak itself works
- Snap: nope, not working yet, all tries so far failed
- Distro Packages: untested, probably needs some minor changes
- Windows: nope, no Python yet
- MacOS: nope, no Python yet
Windows user here, and for a long while, (Open)PythonSCAD has "just
worked", and whatever changes are made, I want that to continue to be the
case --- every time virtual environments come up for a Python project, I
quickly find that things stop working --- it can't just be me since there's
an XKCD on it:
https://xkcd.com/1987/
So please, whatever is done, have a standard/default which is simple and
well-documented, so that pretty much anyone can implement it.
William
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
Any post that includes an XKCD references is a SCORE ;-)
On Sun, May 11, 2025 at 4:27 PM William F. Adams via Discuss <
discuss@lists.openscad.org> wrote:
> On Sunday, May 11, 2025 at 03:31:20 PM EDT, Torsten Paul via Discuss <
> discuss@lists.openscad.org> wrote:
>
> >But back to the topic of virtual environments. It would be useful
> >to hear from people who want to use OpenSCAD + Python. What's the
> >view on this?
>
> >Right now *some* official OpenSCAD nightly builds have basic
> >support for creating a virtual environment that can be used to
> >install exter package for use in OpenSCAD.
> >(Menu: File -> Python -> Create Virtual Environment ; Select an
> >empty folder ; Wait for the "Success" popup ; Restart OpenSCAD)
>
> >Status:
> >- AppImage: Works for me :-), may have issues on some distros
> >- Flatpak: *should* work wherever the flatpak itself works
> >- Snap: nope, not working yet, all tries so far failed
> >- Distro Packages: untested, probably needs some minor changes
> >- Windows: nope, no Python yet
> >- MacOS: nope, no Python yet
>
>
> Windows user here, and for a long while, (Open)PythonSCAD has "just
> worked", and whatever changes are made, I want that to continue to be the
> case --- every time virtual environments come up for a Python project, I
> quickly find that things stop working --- it can't just be me since there's
> an XKCD on it:
>
> https://xkcd.com/1987/
>
> So please, whatever is done, have a standard/default which is simple and
> well-documented, so that pretty much anyone can implement it.
>
> William
> _______________________________________________
> OpenSCAD mailing list
> To unsubscribe send an email to discuss-leave@lists.openscad.org
>
TP
Torsten Paul
Sun, May 11, 2025 8:46 PM
On 11.05.25 22:39, edmund ronald via Discuss wrote:
A complete Python seems completely incompatible with the idea of
OpenScad as a drop-in software package.
Why? What problem is there?
What does drop-in software package mean here? OpenSCAD is just
a single app, so what would it replace?
I would urge the designers and maintainers of OpenScad to separate the
ideas of Python scripting/syntax support and complete Python support.
As the language goes, there is only full support. The
Python in OpenSCAD is just the official CPython not
some copy or partial re-implementation.
The discussion is "only" about using external packages
from pypi.org (e.g. things normally installed via pip or
some other package manager). Is that needed, and what are
the options to do so easily.
ciao,
Torsten.
On 11.05.25 22:39, edmund ronald via Discuss wrote:
> A complete Python seems completely incompatible with the idea of
> OpenScad as a drop-in software package.
Why? What problem is there?
What does drop-in software package mean here? OpenSCAD is just
a single app, so what would it replace?
> I would urge the designers and maintainers of OpenScad to separate the
> ideas of Python scripting/syntax support and complete Python support.
As the language goes, there is only *full* support. The
Python in OpenSCAD *is* just the official CPython not
some copy or partial re-implementation.
The discussion is "only" about using external packages
from pypi.org (e.g. things normally installed via pip or
some other package manager). Is that needed, and what are
the options to do so easily.
ciao,
Torsten.
TP
Torsten Paul
Sun, May 11, 2025 8:51 PM
On 11.05.25 22:44, John David via Discuss wrote:
Any post that includes an XKCD references is a SCORE ;-)
On 11.05.25 22:44, John David via Discuss wrote:
> Any post that includes an XKCD references is a SCORE ;-)
Agreed! Why add Python: https://3d.xkcd.com/353/
ciao,
Torsten.
WF
William F. Adams
Sun, May 11, 2025 9:08 PM
On 11.05.25 22:27, William F. Adams wrote:
Venv is exactly the (one) solution against that mess.
Okay.
My experience has been different --- every time a Python project has become so complex that venv becomes necessary, it stops working, or it breaks something else --- but as noted, I'm neutral on this, so long as there is a default setup, which is well-documented, and which works out of the box for the base case of install by a naïve user.
William
On Sunday, May 11, 2025 at 04:40:17 PM EDT, Torsten Paul via Discuss <discuss@lists.openscad.org> wrote:
>On 11.05.25 22:27, William F. Adams wrote:
>> https://xkcd.com/1987/
>Venv is *exactly* the (one) solution *against* that mess.
Okay.
My experience has been different --- every time a Python project has become so complex that venv becomes necessary, it stops working, or it breaks something else --- but as noted, I'm neutral on this, so long as there is a default setup, which is well-documented, and which works out of the box for the base case of install by a naïve user.
William
WF
William F. Adams
Sun, May 11, 2025 9:09 PM
I see that python+openscad has inevitably become a debate topic.
Well, it has been in the past.
I see inevitably because openscad started with a private language, and people thought why have that when we know python already.
The arguments for the Domain Specific Language OpenSCAD are myriad and persuasive:
- simplicity
- reliability
- security
The difficulty seems to be that people want a full python environment, not simply python scripting syntax inside the software.
It would be nice to have an option of a supported subset which could always be enabled --- but that adds so much complexity (and a potential security hole) that it seems hard to justify (though I have argued for it in the past)
A complete Python seems completely incompatible with the idea of OpenScad as a drop-in software package.
Seems to work well:
https://pythonscad.org/
and I've been using it quite successfully on a project:
https://github.com/WillAdams/gcodepreview
which before Python became an option was so hobbled by the lack of persistent variables, and the impossibility of writing out a file with a specific file extension and contents that it was essentially useless.
I would urge the designers and maintainers of OpenScad to separate the ideas of Python scripting/syntax support and complete Python support.
They are separate.
The default is: OpenSCAD as OpenSCAD --- just there is an (unused) hook to Python inside.
It is only if a user chooses to enable Python, and then goes to the trouble to load or create a Python file that one has to worry about Python --- otherwise, just ignore it, and it shouldn't trouble you.
Hopefully though, this will capture all of the energy and effort and creativity which folks were constantly pouring into using Python to make OpenSCAD code --- really looking forward to seeing what comes of this being readily available to the folks who are interested in it.
I would like to take this moment to note that I think that the idea of the developers making use of Python internally to work up features for OpenSCAD itself has merit and potential, and if any code or documentation (such as it is) which I have written would be useful for this, folks are welcome to it.
William
On Sunday, May 11, 2025 at 04:39:58 PM EDT, edmund ronald <edmundronald@gmail.com> wrote:
>I see that python+openscad has inevitably become a debate topic.
Well, it has been in the past.
>I see inevitably because openscad started with a private language, and people thought why have that when we know python already.
The arguments for the Domain Specific Language OpenSCAD are myriad and persuasive:
- simplicity
- reliability
- security
>The difficulty seems to be that people want a full python environment, not simply python scripting syntax inside the software.
It would be nice to have an option of a supported subset which could always be enabled --- but that adds so much complexity (and a potential security hole) that it seems hard to justify (though I have argued for it in the past)
>A complete Python seems completely incompatible with the idea of OpenScad as a drop-in software package.
Seems to work well:
https://pythonscad.org/
and I've been using it quite successfully on a project:
https://github.com/WillAdams/gcodepreview
which before Python became an option was so hobbled by the lack of persistent variables, and the impossibility of writing out a file with a specific file extension and contents that it was essentially useless.
>I would urge the designers and maintainers of OpenScad to separate the ideas of Python scripting/syntax support and complete Python support.
They are separate.
The default is: OpenSCAD as OpenSCAD --- just there is an (unused) hook to Python inside.
It is only if a user chooses to enable Python, and then goes to the trouble to load or create a Python file that one has to worry about Python --- otherwise, just ignore it, and it shouldn't trouble you.
Hopefully though, this will capture all of the energy and effort and creativity which folks were constantly pouring into using Python to make OpenSCAD code --- really looking forward to seeing what comes of this being readily available to the folks who are interested in it.
I would like to take this moment to note that I think that the idea of the developers making use of Python internally to work up features for OpenSCAD itself has merit and potential, and if any code or documentation (such as it is) which I have written would be useful for this, folks are welcome to it.
William