Re: searching through a string and pulling characters

2008-08-20 Thread Sean DiZazzo
On Aug 19, 6:11 am, Wojtek Walczak [EMAIL PROTECTED] wrote: On Mon, 18 Aug 2008 15:34:12 -0700 (PDT), Alexnb wrote: Also, on a side-note, does anyone know a very simple dictionary site, that isn't dictionary.com or yourdictionary.com. This one is my favourite:http://www.lingro.com/ --

Re: searching through a string and pulling characters

2008-08-19 Thread Paul Boddie
On 19 Aug, 01:11, Steven D'Aprano [EMAIL PROTECTED] cybersource.com.au wrote: On Mon, 18 Aug 2008 15:34:12 -0700, Alexnb wrote: Okay, well the point of this program is to steal from the OS X built-in dictionary. Ah, not homework, but copyright infringement. It depends what the inquirer is

Re: searching through a string and pulling characters

2008-08-19 Thread Wojtek Walczak
On Mon, 18 Aug 2008 15:34:12 -0700 (PDT), Alexnb wrote: Also, on a side-note, does anyone know a very simple dictionary site, that isn't dictionary.com or yourdictionary.com. This one is my favourite: http://www.lingro.com/ -- Regards, Wojtek Walczak, http://tosh.pl/gminick/ --

searching through a string and pulling characters

2008-08-18 Thread Alexnb
! ;) -- View this message in context: http://www.nabble.com/searching-through-a-string-and-pulling-characters-tp19039594p19039594.html Sent from the Python - python-list mailing list archive at Nabble.com. -- http://mail.python.org/mailman/listinfo/python-list

Re: searching through a string and pulling characters

2008-08-18 Thread Wojtek Walczak
On Mon, 18 Aug 2008 13:40:13 -0700 (PDT), Alexnb wrote: Now, I am talking 1000's of these. I need to do something like this. I will have a number, and what I want to do is go through this text file, just like the example. The trick is this, those ()'s are what I need to match, so if the number

Re: searching through a string and pulling characters

2008-08-18 Thread nntpman68
Hi, Is it thousands of lines or millions of lines? If it's just a few thousands and you're not working on an embedded device with little memory you could use the brute force approach Just read the whole file in one string vaiable split everything into an array separated by '()' Now you can

Re: searching through a string and pulling characters

2008-08-18 Thread Gabriel Genellina
En Mon, 18 Aug 2008 17:40:13 -0300, Alexnb [EMAIL PROTECTED] escribió: Lets say I have a text file. The contents look like this, only there is A LOT of the same thing. () A registry mark given by underwriters (as at Lloyd's) to ships in first-class condition. Inferior grades are indicated by

Re: searching through a string and pulling characters

2008-08-18 Thread Wojtek Walczak
On Mon, 18 Aug 2008 21:43:43 + (UTC), Wojtek Walczak wrote: On Mon, 18 Aug 2008 13:40:13 -0700 (PDT), Alexnb wrote: Now, I am talking 1000's of these. I need to do something like this. I will have a number, and what I want to do is go through this text file, just like the example. The

Re: searching through a string and pulling characters

2008-08-18 Thread John Machin
On Aug 19, 6:40 am, Alexnb [EMAIL PROTECTED] wrote: This is similar to my last post, Oh, goodie goodie goodie, I love guessing games! but a little different. Here is what I would like to do. Lets say I have a text file. The contents look like this, only there is A LOT of the same thing.

Re: searching through a string and pulling characters

2008-08-18 Thread Alexnb
? select column2 from K where column1 = 'A1'? IOW, perhaps you may need to consider the larger problem. Cheers, John -- http://mail.python.org/mailman/listinfo/python-list -- View this message in context: http://www.nabble.com/searching-through-a-string-and-pulling-characters

Re: searching through a string and pulling characters

2008-08-18 Thread John Machin
On Aug 19, 8:34 am, Alexnb [EMAIL PROTECTED] wrote: The number is based on the word(s) they type into my program, and then it fetches the number that word is in the list of words and then will search the definitions document and go to the nth def. It probably won't work, but that is the Idea.

Re: searching through a string and pulling characters

2008-08-18 Thread Steven D'Aprano
On Mon, 18 Aug 2008 13:40:13 -0700, Alexnb wrote: Lets say I have a text file. The contents look like this, only there is A LOT of the same thing. () A registry mark given by underwriters (as at Lloyd's) to ships in first-class condition. Inferior grades are indicated by A 2 and A 3. ()

Re: searching through a string and pulling characters

2008-08-18 Thread John Machin
On Aug 19, 8:34 am, Alexnb [EMAIL PROTECTED] wrote: The number is based on the word(s) they type into my program, and then it fetches the number that word is in the list of words and then will search the definitions document and go to the nth def. It probably won't work, but that is the Idea.

Re: searching through a string and pulling characters

2008-08-18 Thread Alexnb
that I can download to have an offline reference? What happened when you did: -- http://mail.python.org/mailman/listinfo/python-list -- View this message in context: http://www.nabble.com/searching-through-a-string-and-pulling-characters-tp19039594p19041720.html Sent from the Python

Re: searching through a string and pulling characters

2008-08-18 Thread Steven D'Aprano
On Mon, 18 Aug 2008 15:34:12 -0700, Alexnb wrote: Okay, well the point of this program is to steal from the OS X built-in dictionary. Ah, not homework, but copyright infringement. Also, on a side-note, does anyone know a very simple dictionary site, that isn't dictionary.com or