In [EMAIL PROTECTED], Prateek wrote:
Try creating a dict with sequential numeric keys.
If you already have a list called my_list, you can do:
com_array = dict(zip(range(len(my_list)), my_list))
com_array = dict(enumerate(my_list))
That doesn't create the intermediate lists.
Ciao,
Sam the Cat wrote:
Hey All,
I am writing some COM code in Python to control photoshop. Several
functions of PS require an Array argument. In the examples of VBscript or
javascript the Array type is used. I have tried what would appear to be the
equivalent in Python -- Lists and Tuples
I am writing some COM code in Python to control photoshop. Several
functions of PS require an Array argument. In the examples of VBscript
or javascript the Array type is used. I have tried what would appear to
be the equivalent in Python -- Lists and Tuples -- but to no avail.
Anyone
Hey All,
I am writing some COM code in Python to control photoshop. Several
functions of PS require an Array argument. In the examples of VBscript or
javascript the Array type is used. I have tried what would appear to be the
equivalent in Python -- Lists and Tuples -- but to no avail.
Try creating a dict with sequential numeric keys.
If you already have a list called my_list, you can do:
com_array = dict(zip(range(len(my_list)), my_list))
This works when you want to convert Python objects to Javascript using
JSON. It may work for you.
-Prateek
--
On Apr 22, 7:00 pm, Sam the Cat [EMAIL PROTECTED] wrote:
Hey All,
I am writing some COM code in Python to control photoshop. Several
functions of PS require an Array argument. In the examples of VBscript or
javascript the Array type is used. I have tried what would appear to be the