Print a notification with an emoji. If 'spacing' is None, calculate the spacing based on the number of code points in the emoji as terminals "eat" a space when the emoji has multiple code points.
(emoji, message, *, spacing=None)
| 58 | |
| 59 | |
| 60 | def log(emoji, message, *, spacing=None): |
| 61 | """Print a notification with an emoji. |
| 62 | |
| 63 | If 'spacing' is None, calculate the spacing based on the number of code points |
| 64 | in the emoji as terminals "eat" a space when the emoji has multiple code points. |
| 65 | """ |
| 66 | if spacing is None: |
| 67 | spacing = " " if len(emoji) == 1 else " " |
| 68 | print("".join([emoji, spacing, message])) |
| 69 | |
| 70 | |
| 71 | def updated_env(updates={}): |
no test coverage detected