# HG changeset patch # User Paul Boddie # Date 1338745779 -7200 # Node ID 49d2ed18d02345cd2c766298f7e6ddc46289e5d2 # Parent 20ea2e9b841de3477e0f7359b3c5aef3d926c2d6 Changed the warnings to use standard error. diff -r 20ea2e9b841d -r 49d2ed18d023 micropython/__init__.py --- a/micropython/__init__.py Sun Jun 03 01:38:14 2012 +0200 +++ b/micropython/__init__.py Sun Jun 03 19:49:39 2012 +0200 @@ -922,11 +922,11 @@ name_for_return = name.split(".")[0] if self.modules.has_key(name) and self.modules[name].loaded: - #print "Cached (%s)" % name + #print >>sys.stderr, "Cached (%s)" % name return self.modules[name_for_return] if self.verbose: - print "Loading", name + print >>sys.stderr, "Loading", name # Split the name into path components, and try to find the uppermost in # the search path. @@ -935,7 +935,7 @@ m = self.find_in_path(path[0]) if not m: if self.verbose: - print "Not found (%s)" % path[0] + print >>sys.stderr, "Not found (%s)" % path[0] return None # NOTE: Import error. d, filename = m @@ -949,7 +949,7 @@ if len(path) > 1: if not d: if self.verbose: - print "No package (%s)" % filename + print >>sys.stderr, "No package (%s)" % filename return None # NOTE: Import error (package not found). else: self.add_submodules(d, module) @@ -963,7 +963,7 @@ m = self.find(d, p) if not m: if self.verbose: - print "Not found (%s)" % p + print >>sys.stderr, "Not found (%s)" % p return None # NOTE: Import error. d, filename = m module_name = ".".join(path_so_far) @@ -999,16 +999,16 @@ module = self.add_module(module_name) if not module.loaded and module not in self.loading: self.loading.add(module) - #print "Parsing", name + #print >>sys.stderr, "Parsing", name module.parse(name) - #print "Done", name + #print >>sys.stderr, "Done", name self.loading.remove(module) module.loaded = 1 # Record the module. self.use_object(module.full_name()) - #print "Loaded", module_name, "with namespace", module.namespace.keys() + #print >>sys.stderr, "Loaded", module_name, "with namespace", module.namespace.keys() return module def add_module(self, module_name):