Re: Help required to read and print lines based on the type of first character

2009-03-06 Thread Bruno Desthuilliers
abhinayaraj.r...@emulex.com a écrit : (snip) I need to have a look at that all those doc's you have mentioned. That should help. +1 QOTW !-) -- http://mail.python.org/mailman/listinfo/python-list

RE: Help required to read and print lines based on the type of first character

2009-03-05 Thread Abhinayaraj . Raju
-Original Message- From: Bruno Desthuilliers [mailto:bruno.42.desthuilli...@websiteburo.invalid] Sent: Thursday, March 05, 2009 10:45 PM To: python-list@python.org Subject: Re: Help required to read and print lines based on the type of first character abhinayaraj.r...@emulex.com a

Re: Help required to read and print lines based on the type of first character

2009-03-05 Thread Bruno Desthuilliers
abhinayaraj.r...@emulex.com a écrit : Please, don't top-post, and learn to quote & snip (if you don't know what top-posting is, google is your friend). Thank you so much for your guidance, Bruno. This should help me in a long way. Here is the code I have written. path = raw_input("\nEnter

RE: Help required to read and print lines based on the type of first character

2009-03-05 Thread Abhinayaraj . Raju
nt data Thanks Abhi -Original Message- From: Bruno Desthuilliers [mailto:bruno.42.desthuilli...@websiteburo.invalid] Sent: Thursday, March 05, 2009 6:50 PM To: python-list@python.org Subject: Re: Help required to read and print lines based on the type of first character (answering to the

Re: Help required to read and print lines based on the type of first character

2009-03-05 Thread Bruno Desthuilliers
(answering to the OP) En Wed, 04 Mar 2009 07:36:01 -0200, escribió: I am a beginner in Python. In fact, beginner to coding/ scripting. Here is a scenario, I need to code. Need your help on this: Your first task here should be to refine the specs - too much ambiguities in it: A script th

RE: Help required to read and print lines based on the type of first character

2009-03-05 Thread rdmurray
abhinayaraj.r...@emulex.com wrote: > Thank you for the suggestions. > > Some little reading gave the idea and it works well too. :) > > Here is the code: > fileIN = open("test.txt") > count = 0 > for line in fileIN: > data= line > > if '' in data: > count = 4 >

Re: Help required to read and print lines based on the type of first character

2009-03-04 Thread Paul Rubin
abhinayaraj.r...@emulex.com writes: > if '' in data: > count = 4 > elif '###' in data: > count = 3 > elif '##' in data: > count = 2 > elif '#' in data: > count = 1 > elif data.find('#') == -1: >

RE: Help required to read and print lines based on the type of first character

2009-03-04 Thread Abhinayaraj . Raju
sl-...@yahoo.com.ar] Sent: Thursday, March 05, 2009 10:41 AM To: Raju, Abhinayaraj Cc: python-list@python.org Subject: Re: Help required to read and print lines based on the type of first character De: "abhinayaraj.r...@emulex.com" > I am sorry to that I am not able to fully grasp

Re: Help required to read and print lines based on the type of first character

2009-03-04 Thread gagsl-py2
De: "abhinayaraj.r...@emulex.com" > I am sorry to that I am not able to fully grasp it. Could you help me with > some more details? > How can I identify each line and utilize the interactive interpreter? You really should read the tutorial at http://docs.python.org/tut (or any other introductor

Re: Help required to read and print lines based on the type of first character

2009-03-04 Thread Gabriel Genellina
En Wed, 04 Mar 2009 07:36:01 -0200, escribió: I am a beginner in Python. In fact, beginner to coding/ scripting. Here is a scenario, I need to code. Need your help on this: A script that 1. Reads from a file (may be a local file say test.txt) 2. And, if the line begins with a "#", s