This would be instead of doing the executing a series of writelines to an open file handle. Function code is here: https://github.com/micropython/webrepl/blob/master/webrepl_cli.py#L119