Module zut
Reusable Python utilities.
Functions
Replace invalid XML control characters. |
|
|
Fix potential encoding issues for files open with file.open('r', encoding='utf-8', errors='surrogateescape'). |
|
|
|
|
|
Get a human-readable representation of a number of bytes. |
|
Get a human-readable representation of a number. |
|
|
|
|
|
Open the file in bytes mode, read it, and close the file. |
|
Open the file in text mode, read it, and close the file. |
|
Skip UTF8 byte order mark, if any. |
|
Similar as slugify except than some defaults are changed compared to Django's version and some additional letters are handled. |
|
Generate a slug. |
|
CamèlCase => camel_case |
|
Open the file in bytes mode, write to it, and close the file. |
|
Open the file in text mode, write to it, and close the file. |
Classes
|
|
|
|
|
Exceptions
|
|
|
An error that should result to only an error message being printed on the console, without a stack trace. |