Re: [BangPypers] File read

2011-11-07 Thread steve
Hey Shashidhar, Others may answer your question, I am not going to do that right away. I'll just offer a few suggestions to clean up your code. If you do that, I promise to answer your questions: a. Use os.path.join() to join path components b. You don't /have/ to read all the lines of the f

Re: [BangPypers] scanf replacement in python

2011-11-07 Thread kracekumar ramaraju
On Mon, Nov 7, 2011 at 10:07 PM, steve wrote: > On 11/06/2011 11:59 AM, kracekumar ramaraju wrote: > >> Hello >> >>The question might be simple, but it has a trick. >> * >> * >> *c code* >> *scanf("%d, %d",&m,&n)* >> >> >> The code can accept two nos separated by a space. >> >> *Question*: W

Re: [BangPypers] scanf replacement in python

2011-11-07 Thread steve
On 11/06/2011 11:59 AM, kracekumar ramaraju wrote: Hello The question might be simple, but it has a trick. * * *c code* *scanf("%d, %d",&m,&n)* The code can accept two nos separated by a space. *Question*: What is the equivalent in python? *Answer 1:* *p* *Shortcoming*: I need press ret

[BangPypers] File read

2011-11-07 Thread Shashidhar Paragonda
Dear Python hackers, I have text file. I read each line and store it in List. my requirement is I need to check only 6 special lines from i.e 1. resultToPDFFile 2. resultToPDFFileDialog 3. resultToQdasFile 4. resultToQdasFileDialog 5. resultToTableFile 6. resultToTableFileDialog

Re: [BangPypers] File read

2011-11-07 Thread Kenneth Gonsalves
On Mon, 2011-11-07 at 16:53 +0530, Shashidhar Paragonda wrote: > is my if else structure is wrong or not I am totally not getting > other idea please help > >> thank you in advance. please paste code -- regards Kenneth Gonsalves ___ BangPypers mailin

[BangPypers] File read

2011-11-07 Thread Shashidhar Paragonda
Dear Python hackers, I have text file. I read each line and store it in List. my requirement is I need to check only 6 special lines from i.e 1. resultToPDFFile 2. resultToPDFFileDialog 3. resultToQdasFile 4. resultToQdasFileDialog 5. resultToTableFile 6. resultToTableFi

[BangPypers] File read

2011-11-07 Thread Shashidhar Paragonda
Dear Python hackers, I have text file. I read each line and store it in List. my requirement is I need to check only 6 special lines from i.e 1. resultToPDFFile 2. resultToPDFFileDialog 3. resultToQdasFile 4. resultToQdasFileDialog 5. resultToTableFile 6. resultT