Advertisement
Guest User

Untitled

a guest
Jun 25th, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.87 KB | None | 0 0
  1. (20:46:32) Collin: Any idea why I would get an EOFError when using raw_input in python?
  2. (20:46:45) Brian: tell me your scenario
  3. (20:47:21) Collin:
  4.     elif x == 12: # READ
  5.         if b == 0: regs[a] = int(raw_input('Decimal < ')) # DD
  6.  
  7. (20:47:35) Collin: That's a line from my PC-231 simulator
  8. (20:47:42) Collin: x is the instruction
  9. (20:47:52) Collin: a and b are the arguments
  10. (20:48:08) Brian: look
  11. (20:48:13) Brian: :brian @gateau (4)> echo 'raw_input()' | python2
  12.  
  13. (20:48:16) Brian: Then I hit ^D
  14. (20:48:21) Brian: Traceback (most recent call last):
  15.  File "<stdin>", line 1, in <module>
  16. EOFError: EOF when reading a line
  17. (20:48:26) Brian: It's EXACTLY what it sounds like
  18. (20:48:29) Brian: It hit the end of the file
  19. (20:48:30) Brian: Dork
  20. (20:48:36) Collin: Except I didn't hit Ctrl-D
  21. (20:48:45) Brian: No shit
  22. (20:48:48) Brian: It means you ran out of file
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement