Print how many entities have been retrieved
authorSverre Rabbelier <srabbelier@gmail.com>
Thu, 02 Apr 2009 23:05:31 +0000
changeset 2056 bbd16a156bde
parent 2055 b4375ec63de5
child 2057 990c82e5baa9
Print how many entities have been retrieved Patch by: Sverre Rabbelier
scripts/interactive.py
--- a/scripts/interactive.py	Thu Apr 02 19:40:28 2009 +0000
+++ b/scripts/interactive.py	Thu Apr 02 23:05:31 2009 +0000
@@ -35,7 +35,6 @@
 import getpass
 import os
 import sys
-import sys
 
 
 def auth_func():
@@ -56,6 +55,8 @@
   Retrieved from http://tinyurl.com/d887ll (AppEngine cookbook).
   """
 
+  from google.appengine.ext import db
+
    # AppEngine will not fetch more than 1000 results
   batchSize = min(batchSize,1000)
 
@@ -67,6 +68,7 @@
     key = db.Key(key)
 
   while not done:
+    print count
     query = queryGen()
     if key:
       query.filter("__key__ > ",key)