[Tutor] using python for parsing

Alan Gauld alan.gauld at btinternet.com
Thu Jun 27 01:42:36 CEST 2013


On 26/06/13 18:05, Makarand Datar wrote:

> I know practically nothing about python. I know how to install it and
> all that kind of stuff. I want to use python for parsing a text file.

So far so good. Do you know how to program in any other language?
It will help us direct you to a source if we know your level of prior 
knowledge.

> The task is to read in a text file, and write out another text file that
> is written in some particular way using the data from the file that was
> read in.

Again, so far so good.

> The question is how do I go about this? What part of python
> documentation, or a book I should read etc. I dont want to start reading
> a python book from the first page. I just want to do this parsing task
> and I will learn about whatever I need to as I encounter it.

Unless you are already very familiar with another programming
language then that is a very inefficient way to learn.
However if you really have the time to bounce about looking
up random references so you can understand one chapter you
can try the Handling Files topic in my tutorial.
It does however assume you've read the preceding topics....

As a matter of interest, if you wanted to play a tune on
guitar would you ask to learn only how to play the specific
notes in that tune?

-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/



More information about the Tutor mailing list