Re: Dumb Stupid Question About List and String

2010-09-01 Thread Xavier Ho
2010/9/2 Alban Nona > Hello Xavier, working great ! thank you very much ! :p > Do you know by any chance if dictionnary can be sorted asthis: > Look at the sorted() global function in the Python API. ;] Cheers, Xav -- http://mail.python.org/mailman/listinfo/python-list

Re: Dumb Stupid Question About List and String

2010-09-01 Thread MRAB
On 01/09/2010 17:49, Alban Nona wrote: Hello Xavier, Thank you :) Well what Iam trying to generate is that kind of result: listn1=['ELM001_DIF', 'ELM001_SPC', 'ELM001_RFL', 'ELM001_SSS', 'ELM001_REFR', 'ELM001_ALB', 'ELM001_AMB', 'ELM001_NRM', 'ELM001_MVE', 'ELM001_DPF', 'ELM001_SDW', 'ELM001_

Re: Dumb Stupid Question About List and String

2010-09-01 Thread Xavier Ho
On 2 September 2010 02:49, Alban Nona wrote: > Well what Iam trying to generate is that kind of result: > > listn1=['ELM001_DIF', 'ELM001_SPC', 'ELM001_RFL', 'ELM001_SSS', > 'ELM001_REFR', 'ELM001_ALB', 'ELM001_AMB', 'ELM001_NRM', 'ELM001_MVE', > 'ELM001_DPF', 'ELM001_SDW', 'ELM001_MAT', 'ELM001_

Re: Dumb Stupid Question About List and String

2010-09-01 Thread Alban Nona
Hello Xavier, Thank you :) Well what Iam trying to generate is that kind of result: listn1=['ELM001_DIF', 'ELM001_SPC', 'ELM001_RFL', 'ELM001_SSS', 'ELM001_REFR', 'ELM001_ALB', 'ELM001_AMB', 'ELM001_NRM', 'ELM001_MVE', 'ELM001_DPF', 'ELM001_SDW', 'ELM001_MAT', 'ELM001_WPP'] listn2 = ['ELM002_DI

Re: Dumb Stupid Question About List and String

2010-09-01 Thread Xavier Ho
On 2 September 2010 01:11, Alban Nona wrote: > Hello, > > seems to have the same error with python. > In fact I was coding within nuke, a 2d compositing software (not the best) > unfortunately, I dont see how I can use dictionnary to do what I would like > to do. > Hello Alban, The reason it's

Re: Dumb Stupid Question About List and String

2010-09-01 Thread Alban Nona
Hello, seems to have the same error with python. In fact I was coding within nuke, a 2d compositing software (not the best) unfortunately, I dont see how I can use dictionnary to do what I would like to do. 2010/9/1 Xavier Ho > On 2 September 2010 00:47, Alban Nona wrote: > >> Hello, >> >> So

Re: Dumb Stupid Question About List and String

2010-09-01 Thread Xavier Ho
On 2 September 2010 00:47, Alban Nona wrote: > Hello, > > So I figure out this night how to create automatically varibales via > vars(), the script seems to work, exept that where it should give me a list > like : > [ELM004_DIF,ELM004_SPC,ELM004_RFL,ELM004_SSS, ELM004_REFR, ELM004_ALB, > etc...]

Re: Dumb Stupid Question About List and String

2010-09-01 Thread Alban Nona
Hello, So I figure out this night how to create automatically varibales via vars(), the script seems to work, exept that where it should give me a list like : [ELM004_DIF,ELM004_SPC,ELM004_RFL,ELM004_SSS, ELM004_REFR, ELM004_ALB, etc...] it gave me just one entry in my list, and the last one [ELM0

Re: Dumb Stupid Question About List and String

2010-08-31 Thread Xavier Ho
On 1 September 2010 12:00, Alban Nona wrote: > @Xavier: ShaDoW, WorldPositionPoint (which is the same thing as > WordPointCloud passe) :) > Aha! That's what I was missing. Cheers, Xav -- http://mail.python.org/mailman/listinfo/python-list

Fwd: Dumb Stupid Question About List and String

2010-08-31 Thread Alban Nona
In fact, the First list (wich contain "Elm001, Elm002, Elm003) will be generated automatically from files that I have in a directory, that's why I cant write the same code for Elm002, 003, etc... Because Ill not know how many Elm there will be. 2010/8/31 MRAB > On 01/09/2010 03:00, Alban Nona w

Re: Dumb Stupid Question About List and String

2010-08-31 Thread MRAB
On 01/09/2010 03:00, Alban Nona wrote: @MRAB, thank you, but what if there are like 40 entries like 'Elem00x' ? is there a way to do it automaticaly ? If you can do it for 'Elem001', I'm sure you could write some code to produce a list of 'Elem001', 'Elem002', etc, and check whether any are sub

Re: Dumb Stupid Question About List and String

2010-08-31 Thread Alban Nona
@MRAB, thank you, but what if there are like 40 entries like 'Elem00x' ? is there a way to do it automaticaly ? @Xavier: ShaDoW, WorldPositionPoint (which is the same thing as WordPointCloud passe) :) Anyway, thank you ! 2010/8/31 Xavier Ho > On 1 September 2010 07:57, Alban Nona wrote: > >>

Re: Dumb Stupid Question About List and String

2010-08-31 Thread Xavier Ho
On 1 September 2010 07:57, Alban Nona wrote: > listPass = ["DIF","SPC", "RFL", "SSS", "REFR", "ALB", "AMB", "NRM", "MVE", > "DPF", "SDW", "MAT", "WPP"] > Out of curiosity, could you briefly mention what "SDW" and "WPP" passes are? I've worked out the rest, and these two are riddling my brain. (

Re: Dumb Stupid Question About List and String

2010-08-31 Thread MRAB
On 31/08/2010 22:57, Alban Nona wrote: Just Another Question on this one, Im trying to create that kind of thing in code now: #GENERE ET INCREMENT LE NOM DES ELEMENTS val = 0 list = ["0", "1", "2", "3"] listEl = [] for n in list: val = val + 1 next = "00" +str(val) elem

Re: Dumb Stupid Question About List and String

2010-08-31 Thread Alban Nona
Just Another Question on this one, Im trying to create that kind of thing in code now: #GENERE ET INCREMENT LE NOM DES ELEMENTS val = 0 list = ["0", "1", "2", "3"] listEl = [] for n in list: val = val + 1 next = "00" +str(val) elem = "ELM"+next listEl.append(elem) #I

Re: Dumb Stupid Question About List and String

2010-08-31 Thread Alban Nona
Well, I have a lot to learn :) Thank you very much both of you ! it seems to work now :p 2010/8/31 MRAB > On 31/08/2010 20:20, Alban Nona wrote: > >> Ok, here a solution: >> >> myFirstList = ["FN067_098_MEN", "FN067_098_JIN", "FN067_098_BG"] >> >> mySecondList = >> >> ["FN067_098_MEN_Hair_PUZ_v

Re: Dumb Stupid Question About List and String

2010-08-31 Thread Shashwat Anand
On Wed, Sep 1, 2010 at 12:27 AM, Alban Nona wrote: > Hi all, > > Im stuck on this problem: > I have a function which return me a list of string (basically the result > looks like: ["FN067_098_MEN", FN067_098_JIN", FN067_098_BG"] > In other hand, I have another list full of that kind of entries: >

Re: Dumb Stupid Question About List and String

2010-08-31 Thread MRAB
On 31/08/2010 20:20, Alban Nona wrote: Ok, here a solution: myFirstList = ["FN067_098_MEN", "FN067_098_JIN", "FN067_098_BG"] mySecondList = ["FN067_098_MEN_Hair_PUZ_v001.0001.exr","FN067_098_JIN_Hair_SPC_v001.0001.exr","FN067_098_MEN_Jin_MVE_v001.0001.exr","FR043_010_GEN_NRM_v001.0001.exr"] fo

Re: Dumb Stupid Question About List and String

2010-08-31 Thread Chris Rebert
On Tue, Aug 31, 2010 at 12:20 PM, Alban Nona wrote: > Ok, here a solution: > for n in myFirstList: > var = str(n) n is already a string, so the previous line doesn't do anything useful. Cheers, Chris -- http://mail.python.org/mailman/listinfo/python-list

Re: Dumb Stupid Question About List and String

2010-08-31 Thread MRAB
On 31/08/2010 19:57, Alban Nona wrote: Hi all, Im stuck on this problem: I have a function which return me a list of string (basically the result looks like: ["FN067_098_MEN", FN067_098_JIN", FN067_098_BG"] In other hand, I have another list full of that kind of entries: ["FN067_098_MEN_Hair_PUZ

Re: Dumb Stupid Question About List and String

2010-08-31 Thread Alban Nona
Ok, here a solution: myFirstList = ["FN067_098_MEN", "FN067_098_JIN", "FN067_098_BG"] mySecondList = ["FN067_098_MEN_Hair_PUZ_v001.0001.exr","FN067_098_JIN_Hair_SPC_v001.0001.exr","FN067_098_MEN_Jin_MVE_v001.0001.exr","FR043_010_GEN_NRM_v001.0001.exr"] for n in myFirstList: var = str(n)

Dumb Stupid Question About List and String

2010-08-31 Thread Alban Nona
Hi all, Im stuck on this problem: I have a function which return me a list of string (basically the result looks like: ["FN067_098_MEN", FN067_098_JIN", FN067_098_BG"] In other hand, I have another list full of that kind of entries: ["FN067_098_MEN_Hair_PUZ_v001.0001.exr","FN067_098_JIN_Hair_SPC_v