Re: Dumb Stupid Question About List and String

2010-09-01 Thread Alban Nona
M002_NRM', 'ELM002_MVE', 'ELM002_DPF', 'ELM002_SDW', 'ELM002_MAT', 'ELM002_WPP'] etc... The thing is, the first list will be generated automatically. (so there will be unknow versions of ELM00x) that why Im trying to figure out how to genere

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: > >> Hel

Re: Dumb Stupid Question About List and String

2010-09-01 Thread Alban Nona
[ELM004_WPP] Any Ideas why that please ? http://pastebin.com/7CDbVgdD 2010/9/1 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 wh

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:0

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, Alba

Re: Dumb Stupid Question About List and String

2010-08-31 Thread Alban Nona
eate a new list with only 'ELM001' Elements (eg: newList=['ELM001_DIF', 'ELM001_SPC', 'ELM001_RFL', 'ELM001_SSS', 'ELM001_REFR', 'ELM001_ALB', 'ELM001_AMB', 'ELM001_NRM', 'ELM001_MVE', 'ELM001_DPF

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_J

Re: Dumb Stupid Question About List and String

2010-08-31 Thread Alban Nona
_GEN_NRM_v001.0001.exr"] for n in myFirstList: var = str(n) for n in mySecondList: if var in n: mySecondList.remove(n) print mySecondList :) 2010/8/31 Alban Nona > Hi all, > > Im stuck on this problem: > I have a function which return me a

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

Re: Path / Listing and os.walk problem.

2010-08-26 Thread Alban Nona
ke this we only have what we are interested in for e in listNames: #Juste to check. print e :) 2010/8/26 Alban Nona > Hey ! Thank you guys ! > It help me a lot ! > > @Dennis (Gomes): Thanks ! I tried it it worked well but list me the whole > files :P (and finally crashed pyth

Re: Path / Listing and os.walk problem.

2010-08-26 Thread Alban Nona
? anyway, thank very much guys ! :) and have a good day ! 2010/8/26 Peter Otten <__pete...@web.de> > Alban Nona wrote: > > > Hi > > > > So here is my problem: > > > > I have my render files that are into a directory like this: > > > > c:\l

Path / Listing and os.walk problem.

2010-08-25 Thread Alban Nona
Hi So here is my problem: I have my render files that are into a directory like this: c:\log\renderfiles\HPO7_SEQ004_031_VDM_DIF_V001.0001.exr c:\log\renderfiles\HPO7_SEQ004_031_VDM_DIF_V001.0002.exr c:\log\renderfiles\HPO7_SEQ004_031_VDM_DIF_V001.0003.exr c:\log\renderfiles\HPO7_SEQ004_031

Replace multiple lines in a txt file.

2010-08-23 Thread Alban Nona
Hi everybody, I would like to know if its possible to modify a list of entry that is define into a list and replace it by another list ? I try this piece of code, but Im pretty sure I messed something: http://pastebin.com/HfdkGeB3 Any help appreciated, Thank you :) -- http://mail.python.org/ma

os.stat st_mtime problem

2010-08-16 Thread Alban Nona
Hello, Im stuck with this problem: I would like to os.stat st_mtime to copy only the files that have different modification date. so I found something on internet using this kind of line: if os.stat(dest).st_mtime - os.stat(src).st_mtime > 1: shutil.copy2 (src, dst) So I adapted it to my scri

Subprocess Problem (Wait and while)

2010-08-09 Thread Alban Nona
Hi, I have some problem with my actual code. In fact, the script is done to work within nuke from the foundry which is a compositing software. Homever, I have some code difficulties as I quite new in the area. Here the deal: Im using subprocess command to copy some files into local directory, lik

Re: how to copy and move file with its attribute?

2010-07-19 Thread Alban Nona
rce, dest)) It seems that it wont copy the files File not found - //Production// 0 File(s) copied any idea of why its doing this please ? 2010/7/19 MRAB > Alban Nona wrote: > >> Hello, >> >> About this one. I tried the os.system copy. But it seems I cant find the

Re: how to copy and move file with its attribute?

2010-07-19 Thread Alban Nona
Hello, About this one. I tried the os.system copy. But it seems I cant find the right syntax. *os.system ("xcopy /s %s %s" % (dirname1, dirname2))* This one seems to not working. Is there anyway I can do this way: localpath= c:\ networkpath=g:\ os.system("copy localpath networkpath) I tried

Copy / Update - Paste a directory.

2010-06-28 Thread Alban Nona
Hello everybody ! wow my first time on this mailing list :) Well, here the deal. Im doing a script that basically copy and past into the local drive a specified directory with all this files. Im doing the copy with a copytree which is working well. But, (and I know it will not work as copytree d

Copy / Update - Paste a directory.

2010-06-28 Thread Alban Nona
Hello everybody ! wow my first time on this mailing list :) Well, here the deal. Im doing a script that basically copy and past into the local drive a specified directory with all this files. Im doing the copy with a copytree which is working well. But, (and I know it will not work as copytree do