/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/ui/__init__.py

  • Committer: John Arbash Meinel
  • Date: 2009-07-08 14:37:25 UTC
  • mfrom: (4516 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4517.
  • Revision ID: john@arbash-meinel.com-20090708143725-sc9sjy3mz4cxwxzz
Merge bzr.dev 4516

Show diffs side-by-side

added added

removed removed

Lines of Context:
157
157
        self.stderr = stderr or sys.stderr
158
158
 
159
159
    def get_boolean(self, prompt):
160
 
        # FIXME: make a regexp and handle case variations as well.
161
160
        while True:
162
161
            self.prompt(prompt + "? [y/n]: ")
163
162
            line = self.stdin.readline()
 
163
            line = line.lower()
164
164
            if line in ('y\n', 'yes\n'):
165
165
                return True
166
166
            if line in ('n\n', 'no\n'):
227
227
            prompt = prompt % kwargs
228
228
        prompt = prompt.encode(osutils.get_terminal_encoding(), 'replace')
229
229
        self.clear_term()
230
 
        self.stdout.write(prompt)
 
230
        self.stderr.write(prompt)
231
231
 
232
232
    def note(self, msg):
233
233
        """Write an already-formatted message."""