1.1 --- a/micropython/__init__.py Sun Jun 03 01:38:14 2012 +0200
1.2 +++ b/micropython/__init__.py Sun Jun 03 19:49:39 2012 +0200
1.3 @@ -922,11 +922,11 @@
1.4 name_for_return = name.split(".")[0]
1.5
1.6 if self.modules.has_key(name) and self.modules[name].loaded:
1.7 - #print "Cached (%s)" % name
1.8 + #print >>sys.stderr, "Cached (%s)" % name
1.9 return self.modules[name_for_return]
1.10
1.11 if self.verbose:
1.12 - print "Loading", name
1.13 + print >>sys.stderr, "Loading", name
1.14
1.15 # Split the name into path components, and try to find the uppermost in
1.16 # the search path.
1.17 @@ -935,7 +935,7 @@
1.18 m = self.find_in_path(path[0])
1.19 if not m:
1.20 if self.verbose:
1.21 - print "Not found (%s)" % path[0]
1.22 + print >>sys.stderr, "Not found (%s)" % path[0]
1.23 return None # NOTE: Import error.
1.24 d, filename = m
1.25
1.26 @@ -949,7 +949,7 @@
1.27 if len(path) > 1:
1.28 if not d:
1.29 if self.verbose:
1.30 - print "No package (%s)" % filename
1.31 + print >>sys.stderr, "No package (%s)" % filename
1.32 return None # NOTE: Import error (package not found).
1.33 else:
1.34 self.add_submodules(d, module)
1.35 @@ -963,7 +963,7 @@
1.36 m = self.find(d, p)
1.37 if not m:
1.38 if self.verbose:
1.39 - print "Not found (%s)" % p
1.40 + print >>sys.stderr, "Not found (%s)" % p
1.41 return None # NOTE: Import error.
1.42 d, filename = m
1.43 module_name = ".".join(path_so_far)
1.44 @@ -999,16 +999,16 @@
1.45 module = self.add_module(module_name)
1.46 if not module.loaded and module not in self.loading:
1.47 self.loading.add(module)
1.48 - #print "Parsing", name
1.49 + #print >>sys.stderr, "Parsing", name
1.50 module.parse(name)
1.51 - #print "Done", name
1.52 + #print >>sys.stderr, "Done", name
1.53 self.loading.remove(module)
1.54 module.loaded = 1
1.55
1.56 # Record the module.
1.57
1.58 self.use_object(module.full_name())
1.59 - #print "Loaded", module_name, "with namespace", module.namespace.keys()
1.60 + #print >>sys.stderr, "Loaded", module_name, "with namespace", module.namespace.keys()
1.61 return module
1.62
1.63 def add_module(self, module_name):