Iterparse and ElementTree confusion

2005-08-17 Thread paul . sherwood
Hi Im trying to parse a large(150MB) xml file in order to extract specific required records. import sys from elementtree.ElementTree import ElementTree root = ElementTree(file=big.xml') This works fine for smaller versions of the same xml file but...when i attempted the above my PC goes to lala

Re: Iterparse and ElementTree confusion

2005-08-17 Thread paul . sherwood
Further to the above I pass my found element 'Product' to ElementTree's handy print all function def print_all(element): root = element #Create an iterator iter = root.getiterator() #Iterate for element in iter: #First the element tag name print "Element:",

Re: Iterparse and ElementTree confusion

2005-08-18 Thread paul . sherwood
Ofcourse! Thankyou so much. All is well, using the Iterparse takes a mere 3mins to find the last product in the xml and this is probably due to my checking 1 products for a specific. I feel rather honoured to have 'the' effbot reply to my humble post Thanks again Paul -- http://mail.p

Disable 'windows key'

2005-12-20 Thread paul . sherwood
Hi Ive made a simple game for my 10 month old son. I noticed that (having watched daddy) he loved to bash the keyboard whenever possible. So the game simply displays various pictures of animals, accompanied by the animal sound and printed name, whenever any keys are bashed 3 times. He loves it. Ho