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