~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/osutils.py

  • Committer: Patch Queue Manager
  • Date: 2011-12-18 21:24:45 UTC
  • mfrom: (6379.1.1 no-termios)
  • Revision ID: pqm@pqm.ubuntu.com-20111218212445-onsppr7rdov3cw42
(jelmer) Avoid always importing termios and tty in bzrlib.osutils. (Jelmer
 Vernooij)

Show diffs side-by-side

added added

removed removed

Lines of Context:
2325
2325
 
2326
2326
 
2327
2327
if sys.platform == "win32":
2328
 
    import msvcrt
2329
2328
    def getchar():
 
2329
        import msvcrt
2330
2330
        return msvcrt.getch()
2331
2331
else:
2332
 
    import tty
2333
 
    import termios
2334
2332
    def getchar():
 
2333
        import tty
 
2334
        import termios
2335
2335
        fd = sys.stdin.fileno()
2336
2336
        settings = termios.tcgetattr(fd)
2337
2337
        try: