Hi @diff-arch, thanks for the response! I was messing around with item access vs list access and ultimately it seemed like list access opened up the most doors.
So I’m actually trying to create a python version of a somewhat verbose GH script I was working on recently and someone on the forums set me up with regex that worked well for the front end string parsing:
So that GH script I basically parsed the string for numbers and if a string contained “inches” lets say, it would be converted from inches to model units (feet) in my case.
So essentially I am trying to make a string parser in python that takes text inputs and converts them to the document units. Very similar to the “convert to document units” component in the human plugin but I’m trying to learn how to do this myself to learn python more and because I use this component ALL the time in my definitions but it is the only Human component I ever use.
Your help is much appreciated and any RegEx/parsing tips you could share I would love to glean off of, thank you!
Something else I found interesting is passing a number node after a text panel will actually solve strings by treating them as expressions in some cases:
I then began a quest of seeing if I could “force” strings to become numbers in Python without parsing but I quickly realized the reason this panel method works is probably a result of behind the scenes parsing/pattern matching haha so then I went back to the drawing board…
