Message370373
Writing to those files is obviously as easy, since like you said "because by it's very nature it's non-printable" and you will probably not find it in your data:
with open('file', 'w') as f:
f.write('\x00'.join(data))
It will break if there is a NULL byte in your data, and CSV would quote the element properly instead, but so would "find . -iname "*something*" -print0 | xargs -0 <program>" if one of the file had a NULL byte in their name.
I don't think Python is being unreasonable here, especially considering it has the same drawbacks as the other Unix utilities.
If those solutions to read and write NULL separated files are not enough for your use-case, please give more information so that it can be supported. |
|
Date |
User |
Action |
Args |
2020-05-30 11:40:58 | remi.lapeyre | set | recipients:
+ remi.lapeyre, skip.montanaro, r.david.murray, serhiy.storchaka, bobbyocean, danieljewell |
2020-05-30 11:40:58 | remi.lapeyre | set | messageid: <1590838858.54.0.744903534259.issue27580@roundup.psfhosted.org> |
2020-05-30 11:40:58 | remi.lapeyre | link | issue27580 messages |
2020-05-30 11:40:58 | remi.lapeyre | create | |
|