Re: [Tutor] trying to split or rpartition the contents of a list

2013-05-23 Thread Stuart Tozer
Hello Amit- your solution works very well. Thanks very much! Best regards, Stu On Wed, May 22, 2013 at 11:39 AM, Stuart Tozer wrote: > Thanks very much guys- I'll get back to this when I have a spare moment > and let you know how I get on. > > Cheers, > Stu > > >

Re: [Tutor] trying to split or rpartition the contents of a list

2013-05-22 Thread Stuart Tozer
Thanks very much guys- I'll get back to this when I have a spare moment and let you know how I get on. Cheers, Stu On Wed, May 22, 2013 at 11:06 AM, Albert-Jan Roskam wrote: > > > > >forobjectinobjects:sorted(set(object.split('_',1)[0]))cmds.menuItem(label > =object,parent ="objectMenu") > >

[Tutor] trying to split or rpartition the contents of a list

2013-05-22 Thread Stuart Tozer
Hi everyone. I'm stuck on a problem while developing a small tool for Maya. Basically, I have a folder with some filenames in it which have been returned by os.listdir(). These filenames look something like... apple_d.jpg apple_si.jpg apple_sg.jpg box_d.jpg box_si.jpg pumpkin_d.jpg Right now,