Simon Willison on Nostr: New TIL: A simple pattern for inlining binary content in a Python script TLDR: ...
New TIL: A simple pattern for inlining binary content in a Python script
TLDR: pprint(binary_data) will output a pleasingly wrapped newline-separated sequence of ~80 character bytestrings that you can drop into a Python script in a way that won't result in super-long lines
https://til.simonwillison.net/python/inlining-binary-data
TLDR: pprint(binary_data) will output a pleasingly wrapped newline-separated sequence of ~80 character bytestrings that you can drop into a Python script in a way that won't result in super-long lines
https://til.simonwillison.net/python/inlining-binary-data