Message11919
More fun:
===========
Jython 2.7.2a1+ (default:623eaa3d7834, Apr 18 2018, 07:30:30)
[Java HotSpot(TM) 64-Bit Server VM (Oracle Corporation)] on java1.8.0_162
Type "help", "copyright", "credits" or "license" for more information.
>>> f = open('testseek.log', 'rb')
>>> f.read()
'To seek or not to seek,\nThat is the quewtion.\n'
>>> f.tell()
46L
>>> f.seek(-25, 1)
>>> f.tell()
21L
>>> f.read()
'k,\nThat is the quewtion.\n'
>>> f.seek(0)
>>> f.tell()
0L
>>> f.readline()
'To seek or not to seek,\n'
>>> f.tell()
24L
>>> f.seek(10)
>>> f.readline()
' not to seek,\n'
>>> f.seek(-5, 1)
>>> f.tell()
41L
>>> f.readline()
'ion.\n'
>>> f.readline(40)
''
>>> f.tell()
46L
>>> f.seek(0)
>>> f.tell()
0L
>>> f.readline(40)
'To seek or not to seek,\n'
>>> f.tell()
24L
>>> f.seek(-5, 1)
>>> f.tell()
41L
>>>
yes, I've had too much coffee.... |
|
Date |
User |
Action |
Args |
2018-04-19 17:53:17 | psykiatris | set | messageid: <1524160397.24.0.682650639539.issue2363@psf.upfronthosting.co.za> |
2018-04-19 17:53:17 | psykiatris | set | recipients:
+ psykiatris, fwierzbicki, zyasoft, jeff.allen, santa4nt, amit |
2018-04-19 17:53:17 | psykiatris | link | issue2363 messages |
2018-04-19 17:53:16 | psykiatris | create | |
|