~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/ui/text.py

  • Committer: Robert Collins
  • Date: 2006-05-04 08:39:32 UTC
  • mto: (1697.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 1701.
  • Revision ID: robertc@robertcollins.net-20060504083932-009bfa89993005aa
Add bzrlib.ui.ui_factory.get_boolean().

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
 
25
25
import bzrlib.progress
26
26
from bzrlib.symbol_versioning import *
27
 
from bzrlib.ui import UIFactory
28
 
 
29
 
 
30
 
class TextUIFactory(UIFactory):
 
27
from bzrlib.ui import CLIUIFactory
 
28
 
 
29
 
 
30
class TextUIFactory(CLIUIFactory):
31
31
    """A UI factory for Text user interefaces."""
32
32
 
33
33
    def __init__(self, bar_type=None):
39
39
        """
40
40
        super(TextUIFactory, self).__init__()
41
41
        self._bar_type = bar_type
 
42
        self.stdout = sys.stdout
42
43
 
 
44
    def prompt(self, prompt):
 
45
        """Emit prompt on the CLI."""
 
46
        self.stdout.write(prompt + "? [y/n]:")
 
47
        
43
48
    @deprecated_method(zero_eight)
44
49
    def progress_bar(self):
45
50
        """See UIFactory.nested_progress_bar()."""