diff options
Diffstat (limited to 'Tools/webchecker')
-rwxr-xr-x | Tools/webchecker/wcgui.py | 4 | ||||
-rwxr-xr-x | Tools/webchecker/webchecker.py | 26 | ||||
-rwxr-xr-x | Tools/webchecker/websucker.py | 10 |
3 files changed, 20 insertions, 20 deletions
diff --git a/Tools/webchecker/wcgui.py b/Tools/webchecker/wcgui.py index c6e216c..9422df6 100755 --- a/Tools/webchecker/wcgui.py +++ b/Tools/webchecker/wcgui.py @@ -76,8 +76,8 @@ def main(): opts, args = getopt.getopt(sys.argv[1:], 't:m:qva') except getopt.error as msg: sys.stdout = sys.stderr - print msg - print __doc__%vars(webchecker) + print(msg) + print(__doc__%vars(webchecker)) sys.exit(2) webchecker.verbose = webchecker.VERBOSE webchecker.nonames = webchecker.NONAMES diff --git a/Tools/webchecker/webchecker.py b/Tools/webchecker/webchecker.py index 10e93c7..a172fd9 100755 --- a/Tools/webchecker/webchecker.py +++ b/Tools/webchecker/webchecker.py @@ -155,8 +155,8 @@ def main(): opts, args = getopt.getopt(sys.argv[1:], 'Rd:m:nqr:t:vxa') except getopt.error as msg: sys.stdout = sys.stderr - print msg - print __doc__%globals() + print(msg) + print(__doc__%globals()) sys.exit(2) # The extra_roots variable collects extra roots. @@ -186,7 +186,7 @@ def main(): checkext = not checkext if verbose > 0: - print AGENTNAME, "version", __version__ + print(AGENTNAME, "version", __version__) if restart: c = load_pickle(dumpfile=dumpfile, verbose=verbose) @@ -222,32 +222,32 @@ def main(): c.run() except KeyboardInterrupt: if verbose > 0: - print "[run interrupted]" + print("[run interrupted]") try: c.report() except KeyboardInterrupt: if verbose > 0: - print "[report interrupted]" + print("[report interrupted]") finally: if c.save_pickle(dumpfile): if dumpfile == DUMPFILE: - print "Use ``%s -R'' to restart." % sys.argv[0] + print("Use ``%s -R'' to restart." % sys.argv[0]) else: - print "Use ``%s -R -d %s'' to restart." % (sys.argv[0], - dumpfile) + print("Use ``%s -R -d %s'' to restart." % (sys.argv[0], + dumpfile)) def load_pickle(dumpfile=DUMPFILE, verbose=VERBOSE): if verbose > 0: - print "Loading checkpoint from %s ..." % dumpfile + print("Loading checkpoint from %s ..." % dumpfile) f = open(dumpfile, "rb") c = pickle.load(f) f.close() if verbose > 0: - print "Done." - print "Root:", "\n ".join(c.roots) + print("Done.") + print("Root:", "\n ".join(c.roots)) return c @@ -297,7 +297,7 @@ class Checker: def message(self, format, *args): if args: format = format%args - print format + print(format) def __getstate__(self): return (self.roots, self.todo, self.done, self.bad, self.round) @@ -689,7 +689,7 @@ class Page: if self.verbose >= level: if args: msg = msg%args - print msg + print(msg) # Method to retrieve names. def getnames(self): diff --git a/Tools/webchecker/websucker.py b/Tools/webchecker/websucker.py index 12be86e..e84238e 100755 --- a/Tools/webchecker/websucker.py +++ b/Tools/webchecker/websucker.py @@ -22,8 +22,8 @@ def main(): try: opts, args = getopt.getopt(sys.argv[1:], "qv") except getopt.error as msg: - print msg - print "usage:", sys.argv[0], "[-qv] ... [rooturl] ..." + print(msg) + print("usage:", sys.argv[0], "[-qv] ... [rooturl] ...") return 2 for o, a in opts: if o == "-q": @@ -36,9 +36,9 @@ def main(): ('User-agent', 'websucker/%s' % __version__), ] for arg in args: - print "Adding root", arg + print("Adding root", arg) c.addroot(arg) - print "Run..." + print("Run...") c.run() class Sucker(webchecker.Checker): @@ -116,7 +116,7 @@ def makedirs(dir): return head, tail = os.path.split(dir) if not tail: - print "Huh? Don't know how to make dir", dir + print("Huh? Don't know how to make dir", dir) return makedirs(head) os.mkdir(dir, 0o777) |