Re: How can I compare if 2 files has duplicate entries in python?

2006-03-21 Thread Rene Pijlman
[EMAIL PROTECTED]: >I am new to python. How can I compare if 2 files has duplicate >entries in python? What is an 'entry'? -- René Pijlman Wat wil jij leren? http://www.leren.nl -- http://mail.python.org/mailman/listinfo/python-list

Re: How can I compare if 2 files has duplicate entries in python?

2006-03-21 Thread Larry Bates
[EMAIL PROTECTED] wrote: > I am new to python. How can I compare if 2 files has duplicate entries > in python? > Is there an example for that? What if the files are big and I don't > want to read the whole file in memory. > > Thank you. > You need to supply more

How can I compare if 2 files has duplicate entries in python?

2006-03-21 Thread yinglcs
I am new to python. How can I compare if 2 files has duplicate entries in python? Is there an example for that? What if the files are big and I don't want to read the whole file in memory. Thank you. -- http://mail.python.org/mailman/listinfo/python-list

Re: Duplicate entries in a matrix

2006-01-19 Thread Robert Kern
Chris Lasher wrote: > Now that's definitely what I'm looking for! Thanks! > > By the way, was this line > > In [5]: C = repeat(B, [1,2,1], axis=-1) > > supposed to have a positive 1 value for axis? It works either way, I > see. Is it like a lookup, where an index of -1 returns the last value? >

Re: Duplicate entries in a matrix

2006-01-19 Thread Chris Lasher
Now that's definitely what I'm looking for! Thanks! By the way, was this line In [5]: C = repeat(B, [1,2,1], axis=-1) supposed to have a positive 1 value for axis? It works either way, I see. Is it like a lookup, where an index of -1 returns the last value? If that were true, I supposed the eval

Re: Duplicate entries in a matrix

2006-01-19 Thread Robert Kern
Chris Lasher wrote: > Hello Pythonistas! > I'm looking for a way to duplicate entries in a symmetrical matrix > that's composed of genetic distances. For example, suppose I have a > matrix like the following: > > ABC > A 0.00 0.50

Re: Duplicate entries in a matrix

2006-01-19 Thread Chris Lasher
Hey Gerard, Thanks for the suggestion! It took me a while to figure out how to get this to work. Two things were important: I needed to use the matrixmultiply() function, and the order of the two matrices being multiplied is critcial. Here's how I got the example to work. >>> from Numeric import

Re: Duplicate entries in a matrix

2006-01-18 Thread Gerard Flanagan
Chris Lasher wrote: > Hello Pythonistas! > I'm looking for a way to duplicate entries in a symmetrical matrix > that's composed of genetic distances. For example, suppose I have a > matrix like the following: > > ABC > A 0.00 0.50

Duplicate entries in a matrix

2006-01-18 Thread Chris Lasher
Hello Pythonistas! I'm looking for a way to duplicate entries in a symmetrical matrix that's composed of genetic distances. For example, suppose I have a matrix like the following: ABC A 0.00 0.50 1.00 B 0.50 0.00 0.50 C 1.00 0.50 0.0

Re: Removing Duplicate entries in a file...

2006-01-10 Thread sri2097
Thanx Mike, My problem solved !! I loaded the entire file contnets into list and my job was a piece of cake after that. Srikar -- http://mail.python.org/mailman/listinfo/python-list

Re: Removing Duplicate entries in a file...

2006-01-07 Thread sri2097
Hi there, I'm just curious to know as to how the changes you have suggested will solve the problem. Instead of appending (what I was doing), now we are opening and storing the files in 'binary' format. All the other entries in my file will be gone when I write into the file again. What I actuall n

Re: Removing Duplicate entries in a file...

2006-01-06 Thread Mike Meyer
Error: > break > file_object.close() > > > Now, my problem is after finding the entry in the file, I want to make > changes to the 'values' under the searched 'key' and then insert it > back to the file. But in doing so I'm having duplicat

Re: Removing Duplicate entries in a file...

2006-01-06 Thread Fuzzyman
sri2097 wrote: > Hi all, I'm storing number of dictionary values into a file using the > 'cPickle' module and then am retrieving it. The following is the code > for it - > > # Code for storing the values in the file > import cPickle > > book = {raw_input("Name: "): [int(raw_input("Phone: ")), > r

Removing Duplicate entries in a file...

2006-01-06 Thread sri2097
the file without duplicate entry. file_object = file(database, 'a+') except EOFError: break file_object.close() Now, my problem is after finding the entry in the file, I want to make changes to the 'values' under the searched '

Re: duplicate entries

2005-09-29 Thread Steve Holden
jackie chang wrote: > Dear Python Gurus: > > > > I am a very new Python user, would really appreciate your help. > > > > I used Python to write a web form for users to enter. The underlined > database is Oracle. One validation needs to enforce to eliminate > duplicates entries. For exampl

duplicate entries

2005-09-28 Thread jackie chang
Dear Python Gurus:   I am a very new Python user, would really appreciate your help.   I used Python to write a web form for users to enter. The underlined database is Oracle. One validation needs to enforce to eliminate duplicates entries. For example: one customer ID can only be entered only on