Show More
@@ -51,6 +51,12 b' class ui:' | |||||
51 | def write(self, *args): |
|
51 | def write(self, *args): | |
52 | for a in args: |
|
52 | for a in args: | |
53 | sys.stdout.write(str(a)) |
|
53 | sys.stdout.write(str(a)) | |
|
54 | ||||
|
55 | def write_err(self, *args): | |||
|
56 | sys.stdout.flush() | |||
|
57 | for a in args: | |||
|
58 | sys.stderr.write(str(a)) | |||
|
59 | ||||
54 | def readline(self): |
|
60 | def readline(self): | |
55 | return sys.stdin.readline()[:-1] |
|
61 | return sys.stdin.readline()[:-1] | |
56 | def prompt(self, msg, pat, default = "y"): |
|
62 | def prompt(self, msg, pat, default = "y"): | |
@@ -65,7 +71,7 b' class ui:' | |||||
65 | def status(self, *msg): |
|
71 | def status(self, *msg): | |
66 | if not self.quiet: self.write(*msg) |
|
72 | if not self.quiet: self.write(*msg) | |
67 | def warn(self, *msg): |
|
73 | def warn(self, *msg): | |
68 | self.write(*msg) |
|
74 | self.write_err(*msg) | |
69 | def note(self, *msg): |
|
75 | def note(self, *msg): | |
70 | if self.verbose: self.write(*msg) |
|
76 | if self.verbose: self.write(*msg) | |
71 | def debug(self, *msg): |
|
77 | def debug(self, *msg): |
General Comments 0
You need to be logged in to leave comments.
Login now