Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4e3a277

Browse files
committed
no longer assign into sys; "print chevron" is the way to go
1 parent 94b3463 commit 4e3a277

1 file changed

Lines changed: 6 additions & 7 deletions

File tree

Doc/tools/mkhowto

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,13 @@ PERL_BINARY = "perl"
6464
PYTHON_BINARY = "python"
6565

6666

67-
def usage(options):
68-
print __doc__ % options
67+
def usage(options, file):
68+
print >>file, __doc__ % options
6969

7070
def error(options, message, err=2):
71-
sys.stdout = sys.stderr
72-
print message
73-
print
74-
usage(options)
71+
print >>sys.stderr, message
72+
print >>sys.stderr
73+
usage(options, sys.stderr)
7574
sys.exit(2)
7675

7776

@@ -151,7 +150,7 @@ class Options:
151150
self.formats = list(self.ALL_FORMATS)
152151
self.dvips_safe = "ps" in self.formats
153152
elif opt in ("-H", "--help"):
154-
usage(self)
153+
usage(self, sys.stdout)
155154
sys.exit()
156155
elif opt == "--iconserver":
157156
self.icon_server = arg

0 commit comments

Comments
 (0)