diff options
Diffstat (limited to 'Lib/modulefinder.py')
-rw-r--r-- | Lib/modulefinder.py | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/Lib/modulefinder.py b/Lib/modulefinder.py index 04c9abf..5145f72 100644 --- a/Lib/modulefinder.py +++ b/Lib/modulefinder.py @@ -89,11 +89,11 @@ class ModuleFinder: def msg(self, level, str, *args): if level <= self.debug: for i in range(self.indent): - print " ", - print str, + print(" ", end=' ') + print(str, end=' ') for arg in args: - print repr(arg), - print + print(repr(arg), end=' ') + print() def msgin(self, *args): level = args[0] @@ -482,38 +482,38 @@ class ModuleFinder: """Print a report to stdout, listing the found modules with their paths, as well as modules that are missing, or seem to be missing. """ - print - print " %-25s %s" % ("Name", "File") - print " %-25s %s" % ("----", "----") + print() + print(" %-25s %s" % ("Name", "File")) + print(" %-25s %s" % ("----", "----")) # Print modules found keys = self.modules.keys() keys.sort() for key in keys: m = self.modules[key] if m.__path__: - print "P", + print("P", end=' ') else: - print "m", - print "%-25s" % key, m.__file__ or "" + print("m", end=' ') + print("%-25s" % key, m.__file__ or "") # Print missing modules missing, maybe = self.any_missing_maybe() if missing: - print - print "Missing modules:" + print() + print("Missing modules:") for name in missing: mods = self.badmodules[name].keys() mods.sort() - print "?", name, "imported from", ', '.join(mods) + print("?", name, "imported from", ', '.join(mods)) # Print modules that may be missing, but then again, maybe not... if maybe: - print - print "Submodules thay appear to be missing, but could also be", - print "global names in the parent package:" + print() + print("Submodules thay appear to be missing, but could also be", end=' ') + print("global names in the parent package:") for name in maybe: mods = self.badmodules[name].keys() mods.sort() - print "?", name, "imported from", ', '.join(mods) + print("?", name, "imported from", ', '.join(mods)) def any_missing(self): """Return a list of modules that appear to be missing. Use @@ -603,7 +603,7 @@ def test(): try: opts, args = getopt.getopt(sys.argv[1:], "dmp:qx:") except getopt.error as msg: - print msg + print(msg) return # Process options @@ -634,9 +634,9 @@ def test(): path[0] = os.path.dirname(script) path = addpath + path if debug > 1: - print "path:" + print("path:") for item in path: - print " ", repr(item) + print(" ", repr(item)) # Create the module finder and turn its crank mf = ModuleFinder(path, debug, exclude) @@ -660,4 +660,4 @@ if __name__ == '__main__': try: mf = test() except KeyboardInterrupt: - print "\n[interrupt]" + print("\n[interrupt]") |