Re: Creating A Tuple From A List, Adding To Tuple As You Do

2008-06-05 Thread Terry Reedy
"Karsten Heymann" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | Hi Jeff, | | Jeff Nyman <[EMAIL PROTECTED]> writes: | > I did try this: | > | > for count in range(0, len(DC_List)): | > DC_List.insert(count, '') | | On additional note: You can be quite sure you'll never have to

Re: Creating A Tuple From A List, Adding To Tuple As You Do

2008-06-05 Thread Iain King
On Jun 5, 1:41 pm, Jeff Nyman <[EMAIL PROTECTED]> wrote: > Greetings all. > > The subject line of this thread is probably one of the worst ever. I > was trying to encapsulate what I am doing. Based on my new-found > knowledge from another thread, I'm able to get a list of directories > and they com

Re: Creating A Tuple From A List, Adding To Tuple As You Do

2008-06-05 Thread Karsten Heymann
Hi Jeff, Jeff Nyman <[EMAIL PROTECTED]> writes: > I did try this: > > for count in range(0, len(DC_List)): > DC_List.insert(count, '') On additional note: You can be quite sure you'll never have to iterate over the length of a list (or tuple) in python. Just iterate over the list itself: for

Re: Creating A Tuple From A List, Adding To Tuple As You Do

2008-06-05 Thread John Salerno
"Jeff Nyman" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Does anyone have an > idea of a good approach here? I think it's pretty cool that all three responses to your question suggested the exact same solution. But I guess that in itself is a feature of Python. :) -- http:

Re: Creating A Tuple From A List, Adding To Tuple As You Do

2008-06-05 Thread Jeff Nyman
Thanks to everyone who responded! Yes, those solutions all work and do what I need. I'm also getting much more familiar with how flexible Python is in terms of its language. I think that's been the hardest challenge for me. I'm usually finding I try to "overdo it" when coming up with solutions. O

Re: Creating A Tuple From A List, Adding To Tuple As You Do

2008-06-05 Thread Fuzzyman
On Jun 5, 1:41 pm, Jeff Nyman <[EMAIL PROTECTED]> wrote: > Greetings all. > > The subject line of this thread is probably one of the worst ever. I > was trying to encapsulate what I am doing. Based on my new-found > knowledge from another thread, I'm able to get a list of directories > and they com

Re: Creating A Tuple From A List, Adding To Tuple As You Do

2008-06-05 Thread Paul McGuire
On Jun 5, 7:41 am, Jeff Nyman <[EMAIL PROTECTED]> wrote: > DC_List = ['Baltimore', 'Birmingham', 'Cincinnati', 'Cleveland', > LosAngeles'] > > (Each element in the DC_List is actually a full directory path, but I > shortened that in the interest of clarity.) > > The problem is that I need to pass t

Re: Creating A Tuple From A List, Adding To Tuple As You Do

2008-06-05 Thread Karsten Heymann
Jeff Nyman <[EMAIL PROTECTED]> writes: > from glob import glob > DC_List = glob('vcdcflx006\\Flex\\Sites\\*\\') > DC_List = ['Baltimore', 'Birmingham', 'Cincinnati', 'Cleveland', > LosAngeles'] > The problem is that I need to pass this list to a list control in a > wxWidgets application. In or

Creating A Tuple From A List, Adding To Tuple As You Do

2008-06-05 Thread Jeff Nyman
Greetings all. The subject line of this thread is probably one of the worst ever. I was trying to encapsulate what I am doing. Based on my new-found knowledge from another thread, I'm able to get a list of directories and they come to me in the form of a list. Here is an example: from glob import