Consider supporting my work by purchasing the course this tutorial is a part of i.e. VSCode Power User →
- Make sure your
Local by FlyWheel
WordPress install is a custom install
Consider supporting my work by purchasing the course this tutorial is a part of i.e. VSCode Power User →
Local by FlyWheel
WordPress install is a custom installdef human_readable_to_bytes(size): | |
"""Given a human-readable byte string (e.g. 2G, 10GB, 30MB, 20KB), | |
return the number of bytes. Will return 0 if the argument has | |
unexpected form. | |
""" | |
if (size[-1] == 'B'): | |
size = size[:-1] | |
if (size.isdigit()): | |
bytes = int(size) | |
else: |