mercurial/util.py
changeset 33853 cfcfbe6c96f8
parent 33852 f18b11534274
child 34002 2ad028635ccd
equal deleted inserted replaced
33852:f18b11534274 33853:cfcfbe6c96f8
   174 
   174 
   175 def bytesinput(fin, fout, *args, **kwargs):
   175 def bytesinput(fin, fout, *args, **kwargs):
   176     sin, sout = sys.stdin, sys.stdout
   176     sin, sout = sys.stdin, sys.stdout
   177     try:
   177     try:
   178         sys.stdin, sys.stdout = encoding.strio(fin), encoding.strio(fout)
   178         sys.stdin, sys.stdout = encoding.strio(fin), encoding.strio(fout)
   179         if pycompat.ispy3:
   179         return encoding.strtolocal(pycompat.rawinput(*args, **kwargs))
   180             return encoding.strtolocal(input(*args, **kwargs))
       
   181         else:
       
   182             return raw_input(*args, **kwargs)
       
   183     finally:
   180     finally:
   184         sys.stdin, sys.stdout = sin, sout
   181         sys.stdin, sys.stdout = sin, sout
   185 
   182 
   186 def bitsfrom(container):
   183 def bitsfrom(container):
   187     bits = 0
   184     bits = 0