ArrayStringProperty

I am trying to add a ArrayStringProperty to a property sheet, but am having issues to setup the proper value for the data field from a given string.
My first attempt with a fixed value works well enough.and I get the expected property for

sp = wx.propgrid.ArrayStringProperty(cleanName,value=[‘A’,‘B’,‘C’])
pA = gridAll.Append(sp)

When I need to handle a string value of 'Tom, Dick, Harry", I am stuck on how to convert that string to an acceptable value for a similar line in place of [‘A’,‘B’,‘C’]

>>> 
>>> s = "Tom, Dick, Harry"
>>> names = s.split(', ')
>>> print(names)
['Tom', 'Dick', 'Harry']

Thank you.
It did clarify/muddy my problem.
I finally realized that the data ‘val’ I want to display is actually returned as a list,and if I use
print(val)
it prints

['Tom', 'Dick', 'Harry']

but my call to

sp = wx.propgrid.ArrayStringProperty(cleanName, value=val ) fails with

typeError: ArrayStringProperty() arguments did not match any over loaded call
overload 1: argument ‘value’ has unexpected type ‘str’

As it is, I am very much a Python newb :frowning:

I think value needs to be a list of strings and not a single string. So, if you are starting with a single string of names separated by a comma and a space, you need to split the string (as in my example) and pass the result of the split as the value.

Understood.
The data comes from the Exiftool library from a loop such as:

with ExifToolHelper() as et:
      for d in et.get_metadata(path2Image):
            for k, v in d.items():   
                name = str(k)
                val = str(v)   <<<<

if I use the value of ‘v’ (rather then ‘val’ in the property assignment it works as expected

And thank you for helping :slight_smile: