~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to userinteractor.py

  • Committer: Michael Ellerman
  • Date: 2006-06-05 14:18:25 UTC
  • mto: (0.3.1 shelf-dev)
  • mto: This revision was merged to the branch mainline in revision 393.
  • Revision ID: michael@ellerman.id.au-20060605141825-835ebbb5ffbff21d
Code cleanup, more explicit variable names.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/python
 
2
 
1
3
import sys
2
4
 
3
5
class UserOption:
132
134
            print '  %s - %s' % (opt.char, opt.help)
133
135
 
134
136
    if sys.platform == "win32":
 
137
        import msvcrt
135
138
        def __getchar(self):
136
 
            import msvcrt
137
 
            return msvcrt.getch()
 
139
            return msvcrt.getche()
138
140
    else:
139
141
        def __getchar(self):
140
142
            import tty