python component improvements
I would love the Python editor to get some love in Dynamo:
- auto indenting would be nice.
- ability to run it without exiting the window would be nice(console)
- ability to define more than one output i hate the current gymnastics with single list
- ability to define tool tip message/input parameter requirements on hover
- still no dictionaries, wrapping everything into separate class is a workaround not a solution
These might all be repeats from numerous other requests, but is there a timetable for any of these?
Thank you,
Now that you brought this up again, I copy-paste a modified version of my email from August here to be added to your list:
- Default Values. For many of the nodes we need to be able to assign a default value to the input so users don’t have to provide an input for every single inputs.
- Re-execution of the definition. In some cases Dynamo doesn’t update the custom node upon changing the input vales. I needed to disconnect and reconnect the wires to get it to work.
- Tooltip/Description for inputs and outputs in custom node.
- Having access to the Python node itself from inside the node. (eg. This.IN0.Description = “blah blah blah”)
- Call dynamo nodes inside Python script. Apparently it will be possible in 0.0.7 [Already possible]
- Make Python editor as a docking window and add a run button to node so it can be used as a editor.
- Add helper window for Python component to show the inputs for functions.
I insist on bringing this up every now and then since its a forgotten topic. Thanks for chiming in. Your list is much better :+1:
Yet another request for Dictionary support. https://forum.dynamobim.com/t/get-a-dictionary-out-of-python-node/12817
Just-merged PR DynamoDS/Dynamo#8182 adds a run button to the editor window and allows you to have multiple windows open at once.
Many other very good enhancement ideas in this thread. I hope to have time to address a couple of other frequent requests before 2.0, but I can't promise anything yet.
While I understand the merits of having a decent built-in editor I think that building one will take energy away from working on issues that are more Dynamo-centric. So how do we go about hooking up an external code editor into a Python Node? I would love to be able to edit my code in Sublime Editor.
@tomekpiatek, see this: https://github.com/gtalarico/ironpython-stubs
- Default Values. For many of the nodes we need to be able to assign a default value to the input so users don’t have to provide an input for every single inputs.
We want to strive for as consistent an experience as possible, so given that we think that having a bespoke way to implement defaults into the Python node via UI affordance would introduce a new paradigm. This paradigm would diverge from existing approaches where we currently define functions in codeblocks or custom nodes using the: paramName: type = defaultVal / paramName = defaultVal syntax.
Two options in Dynamo today are as follows:
- Adding a code block with an inline if statement before each input
- Within the Python code you use an if statement and deal with it in code
Note: We are improving the Editor UI of the Python Node and tacking on some improvements to the Python experience at the same time, hence why this thread was resurrected.