Message385693
The high level and low level variants behave the same if you pass in the same flags. You are using the append flag in "open()", but you don't pass the os.O_APPEND flag to "os.open()".
>>> import os
>>> fd = os.open('log', os.O_WRONLY | os.O_APPEND | os.O_CREAT)
>>> os.lseek(fd, 1, os.SEEK_SET)
1
>>> os.write(fd, b'foo')
3
>>> os.close(fd)
>>> os.stat('log').st_size
3
>>> fd = os.open('log2', os.O_WRONLY | os.O_CREAT)
>>> os.lseek(fd, 1, os.SEEK_SET)
1
>>> os.write(fd, b'foo')
3
>>> os.close(fd)
>>> os.stat('log2').st_size
4 |
|
Date |
User |
Action |
Args |
2021-01-26 05:38:32 | christian.heimes | set | recipients:
+ christian.heimes, cotton.seed |
2021-01-26 05:38:32 | christian.heimes | set | messageid: <1611639512.03.0.762101489848.issue43028@roundup.psfhosted.org> |
2021-01-26 05:38:32 | christian.heimes | link | issue43028 messages |
2021-01-26 05:38:31 | christian.heimes | create | |
|