Guest User

Untitled

a guest
May 22nd, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. f = open("file.txt")
  2.  
  3. sys.stdin.buffer
  4. sys.stdin.buffer.raw
  5. sys.stdin.fileno()
  6.  
  7. sin = open(sys.stdin.fileno(), <your open arguments here>)
  8.  
  9. sys.stdin = sin
  10.  
  11. sys.stdin = io.TextIOWrapper(sys.stdin.buffer)
  12.  
  13. sys.stdin = io.TextIOWrapper(sys.stdin.buffer, newline="", encoding="utf-8")
  14. sys.stdout = io.TextIOWrapper(sys.stdout.buffer, newline="rn")
Add Comment
Please, Sign In to add comment