Find and replace is appending when run more than once ...

2009-04-17 Thread Paul . Scipione
Hello, I grabbed some sample code from the web and put together this python script which searches all subdirectories for a specific file type, then replaces a string with a new one. Out of curiosity I ran it again. Here's what happens (this also happens for the files I am looking to replace O

Find duplicates in a list/array and count them ...

2009-03-27 Thread Paul . Scipione
Hello, I'm a newbie to Python. I wrote a Python script which connect to my Geodatabase (ESRI ArcGIS File Geodatabase), retrieves the records, then proceeds to evaluate which ones are duplicated. I do this using lists. Someone suggested I use arrays instead. Below is the content of my script

RE: Find duplicates in a list and count them ...

2009-03-26 Thread Paul . Scipione
Hi D'Arcy J.M. Cain, Thank you. I tried this and my list of 76,979 integers got reduced to a dictionary of 76,963 items, each item listing the integer value from the list, a comma, and a 1. I think what this is doing is finding all integers from my list that are unique (only one instance of i

Find duplicates in a list and count them ...

2009-03-26 Thread Paul . Scipione
Hello, I'm a newbie to Python. I have a list which contains integers (about 80,000). I want to find a quick way to get the numbers that occur in the list more than once, and how many times that number is duplicated in the list. I've done this right now by looping through the list, getting a