changeset 5725:b5eb497c549c

Move prints to stderr.
author Alexander Schremmer <alex AT alexanderweb DOT de>
date Wed, 17 Nov 2010 10:13:44 +0100
parents eed3678687cc
children e7914bd67889
files contrib/googleimport/driver.py
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/googleimport/driver.py	Wed Nov 17 10:07:41 2010 +0100
+++ b/contrib/googleimport/driver.py	Wed Nov 17 10:13:44 2010 +0100
@@ -98,7 +98,7 @@
                 difficulty = find_dict_entry("Difficulty", page_contents)
                 types = find_dict_entry("Type", page_contents)
             except DataNotFoundException, e:
-                print "Could not import %r because of %r" % (page, e)
+                print >>sys.stderr, "Could not import %r because of %r" % (page, e)
                 continue
             desc_m = re.search(desc_pattern, page_contents)
             if not desc_m:
@@ -162,10 +162,10 @@
         tmin, tmax = 0, None
     else:
         tmin, tmax = 0, None
-    print "Collecting tasks ..."
+    print >> sys.stderr, "Collecting tasks ..."
     tasks = Collector("http://moinmo.in/").collect_tasks()
-    print "Importing %i tasks ..." % (len(tasks), )
-    print "\n".join(repr(task) for task in tasks)
+    print >> sys.stderr, "Importing %i tasks ..." % (len(tasks), )
+    print >> sys.stderr, "\n".join(repr(task) for task in tasks)
 
     for task in tasks[tmin:tmax]:
         csvwriter.writerow([summary_prefix + task.summary, task.desc, task.hours, task.mentors, task.difficulty, task.types, task.label])