Autocoding project proposal.

Paul Wright -$P-W$- at verence.demon.co.uk
Sun Jan 27 09:12:09 EST 2002


In article <680.790T2636T9265898threeseas at earthlink.net>,
Timothy Rue <threeseas at earthlink.net> wrote:
>On 25-Jan-02 13:14:16 Paul Wright <-$P-W$- at verence.demon.co.uk> wrote:
>
>
>>... produce real code and show how it is useful.  Show us how your code
>>is better than what already exists.
>
>real code works, IQ.351.py does
>
>Show me the configuration of functionality already existing that is better
>then the VIC,

Right then. Let's make a test file with some words in it.

paul at verence:/hda3/home/paul/downloads$ cat test
foo
bar
baz
wombat
spqr

Looking at the help your program prints out, it might search the file
for a word. So let's try that:

paul at verence:/hda3/home/paul/downloads$ python IQ.34.py test  foo
NOTICE: file> test <does not contain first line filekey. Default filekey> filekey word: sub: file: <used!
=======
foo
bar
baz
wombat
spqr

Ok, so it prints the file containing the word. Let's try a word that's
not in the file:

paul at verence:/hda3/home/paul/downloads$ python IQ.34.py test notinthere
NOTICE: file> test <does not contain first line filekey. Default filekey> filekey word: sub: file: <used!
=======
foo
bar
baz
wombat
spqr

I give it a file and a search pattern and it prints out the entire
file. I give it a search pattern which is not in the file and it still
prints out the entire file.

Using this example, I conclude that grep is better than VIC. Did I
miss something?

-- 
Paul Wright | http://pobox.com/~pw201 |



More information about the Python-list mailing list