leon-thomm / Ryven

Flow-based visual scripting for Python
https://ryven.org
MIT License
3.77k stars 439 forks source link

Generate executable from flow #92

Open Berttwm opened 2 years ago

Berttwm commented 2 years ago

I would like to check if there is any way to export/generate/produce an executable file, or even a runnable *.py file from the flow that I've created. I'm wondering if there's any logical way to go about this as I would like to obtain an executable from the flows I've made in Ryven. Thanks!

leon-thomm commented 2 years ago

@Berttwm so you are looking for a way to turn a python script generated from a flow (see #68) into an executable from python itself, i.e. from another python script. There are probably various ways to accomplish that in principal (depends a bit on your system constraints etc.). Finding a suitable way to do that does not depend on the usage of Ryven, it's a typical scripting task.

Once you have a nice way of generating your source code and turning it into an executable, you can simply put this program into a node with a button and an action to trigger it, or something like that. In case your flows are trees (so they have a root, see Unreal Engine's material editor for example), you can directly put this functionality into the root node.