2020-07-16 | Paul Boddie | file changeset files shortlog | Fixed int limit macros by actually using the size of the int type. For wider types such as long, which may be usable on 64-bit platforms in place of int, 1L would need to be used instead of 1 in the calculation. An abstract native integer type might be introduced here and to the native library to allow wider types if appropriate. |
paul@343 | 1 | from sys import stdin |
paul@343 | 2 | |
paul@347 | 3 | print "Reading 10 bytes..." |
paul@343 | 4 | s = stdin.read(10) |
paul@343 | 5 | print s |
paul@343 | 6 | |
paul@347 | 7 | print "Reading to end of file..." |
paul@343 | 8 | s = stdin.read() |
paul@343 | 9 | print s |