Pattern matching from a text document

George Sakkis gsakkis at rutgers.edu
Wed Mar 23 20:23:46 CET 2005


B
"Ben" <benji_tranter at hotmail.com> wrote in message
news:1111596005.241773.136870 at z14g2000cwz.googlegroups.com...
> I'm currently trying to develop a demonstrator in python for an
> ontology of a football team. At present all the fit players are
> exported to a text document.
>
> The program reads the document in and splits each line into a string
> (since each fit player and their attributes is entered line by line in
> the text document) using list = target.splitlines()
>
> [snipped]
>
> The program then performs a loop like so:
>
> The two main problems I'm having are that the first and entry in the
> list is not printing. Once I have overcome this problem I then need
> each player and there related variables to be stored seperately. This
> is not happening at present because each time the loop runs it
> overwrites the value in each variable.
>
> Any help would be greatly appreciated.
>
> Ben.


Ben, can you post a sample line from the document and indicate the fields you want to extract? I'm
sure it will be easier to help you this way.

George


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"If a slave say to his master: "You are not my master," if they convict
him his master shall cut off his ear."

Hammurabi's Code of Laws
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~





More information about the Python-list mailing list