Re: [Tutor] Script to generate statements

2013-03-17 Thread Charles Leviton
Many thanks to Peter, Steven, Dave and Alan as well. Especially Peter's hints about using the "with construct". I discovered the missing strip() the hard way! ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://m

Re: [Tutor] Script to generate statements

2013-03-17 Thread Charles Leviton
Hi thanks for the response On Fri, Mar 15, 2013 at 5:43 PM, Hugo Arts wrote: > On Fri, Mar 15, 2013 at 9:03 PM, Hugo Arts wrote: > >> >> I have a few comments >> >> * Does the script work? If yes, I'd say it's probably fine. Pretty short >> so easy to understand whatever you do, and I see no ob

[Tutor] Script to generate statements

2013-03-15 Thread Charles Leviton
I was recently given this task. it's a very IBM mainframe specific task so I'm not sure how to find equivalent terms in another environment. I will just use the mainframe terminology and hopefully y'all can figure out what I mean. Given a list of DBRM members create a JCL which has a series of b

Re: [Tutor] Fwd: findall() returns tuples or string?

2013-03-07 Thread Charles Leviton
Thanks Devin. now I have a better understanding of what happens. Let me explore finditer- hearing for the first time. On Mon, Mar 4, 2013 at 8:47 PM, Devin Jeanpierre wrote: > On Mon, Mar 4, 2013 at 8:22 PM, Charles Leviton > wrote: > > I have some confusion regarding when finda

[Tutor] Fwd: findall() returns tuples or string?

2013-03-04 Thread Charles Leviton
I have some confusion regarding when findall returns a list of strings and when it returns a list of tuples. Would appreciate an explanation. I thought if I "grouped" my match string using parentheses I'd get a list of tuples but this example below belies my expectation. s1 = '1MichaelJessica' >>