On Friday, October 14, 2011 09:45:57 am Tony Pelletier wrote: > Hi, > > I have a question regarding the speed of my program on linux in comparison > to windows. > > I'm using geopy and contacting Google for geocodes for records in a csv I > created. Like such: > > try: > reader = csv.reader(open(filename, "r")) > for row in reader: > if row: # Checking to see if it's a valid row so it doesn't > blow up on an empty row. > username, address, address2, city, state, zip, country = > row[0:7] > location = address + ', ' + city + ' ' + state + ' ' + zip > + ' ' + country > try: > place, (lat, lng) = g.geocode(location) # Contact > Google for Geocodes > > I mainly use windows, but I tend to use Arch Linux at home. When I run it > via windows, it's relatively slow and didn't really bother me, but when I > ran it at home I got through 15 or so and got a message back from google > saying I was exceeding the allowed amount. Or something to that effect. > Basically, I was exceeding the 10 per second that's allowed. > > So, my question is. Why is it running so much faster on linux? Is it the > way that linux is handling the socket? Does windows open and close it > whereas linux might leave it open and just pump data through? > > It's not really a problem since I just added sleep time, but I'm curious. > > Thanks > Tony
It's a very good question that I'd like to hear the answer too. When ever I run pure python on linux is always runs faster (this has been my experience). I of course have not a clue as to why (or I might not be monitoring this list). But I bet other do know! Johnf _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor