Value List values (set by Python script) report being "None"

Ah okay, I see what you mean now - there were actually two separate issues there, one of which was the odd panel formatting difference between the top and bottom panels.

Value lists will evaluate the right hand side of the expression, so you have to wrap them in double quotes to be parsed as strings, something like this:

for n in newlist:
    try: # to parse n as an integer
        int(n)
        rhs = n
    except ValueError:
        rhs = '"{}"'.format(n)
    vallistitems.Add(Grasshopper.Kernel.Special.GH_ValueListItem(n, rhs))

image
See attached ghValueListSet_edited.gh (13.9 KB)

2 Likes