Python 's list comprehension in XSI 2005-03-28 - By Aloys Baillet
Back Salut Bernard,
Sorry, but your code is correct! I don't get any syntax error message... Have you checked that you have selected the Python language in the preferences;)?
Application.CreatePrim("Sphere", "MeshSurface", "", "") oObj = Application.Selection(0) aObjParams = [ str(oParam.name) for oParam in oObj.Parameters ] Application.LogMessage( str( aObjParams ) )
Cheers,
On Fri, 25 Mar 2005 23:16:42 -0500, Bernard Lebel <softimage@(protected)> wrote: > Hello, > > Whenever I try to run this line, I always get an invalid syntax error: > > aObjParams = [ str(oParam.name) for oParam in oObj.parameters ] > > I'm very new to list comprehension, and I don't see anything wrong the > said syntax. Anyone has an idea? > > Thanks > Bernard > > --- > Unsubscribe? Mail Majordomo@(protected) with the following text in body: > unsubscribe xsi >
-- Aloys Baillet - TD / R&D @ La Maison - www.alamaison.fr --- Unsubscribe? Mail Majordomo@(protected) with the following text in body: unsubscribe xsi
|
|