/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/osutils.py

  • Committer: Aaron Bentley
  • Date: 2008-10-17 03:49:08 UTC
  • mto: This revision was merged to the branch mainline in revision 3823.
  • Revision ID: aaron@aaronbentley.com-20081017034908-n330q3dlomiaookr
Remove dependencies on bzrtools

Show diffs side-by-side

added added

removed removed

Lines of Context:
1616
1616
            raise errors.NoSuchFile(f)
1617
1617
        raise
1618
1618
 
1619
 
 
 
1619
if sys.platform == "win32":
 
1620
    import msvcrt
 
1621
    def getchar():
 
1622
        return msvcrt.getch()
 
1623
else:
 
1624
    import tty
 
1625
    import termios
 
1626
    def getchar():
 
1627
        fd = sys.stdin.fileno()
 
1628
        settings = termios.tcgetattr(fd)
 
1629
        try:
 
1630
            tty.setraw(fd)
 
1631
            ch = sys.stdin.read(1)
 
1632
        finally:
 
1633
            termios.tcsetattr(fd, termios.TCSADRAIN, settings)
 
1634
        return ch