code: def send_file_to_host(src_filename, dst_file, filesize):
      
      import sys
      import ubinascii
      try:
          with open(src_filename, 'rb') as src_file:
              bytes_remaining = filesize
              if HAS_BUFFER:
                  buf_size = BUFFER_SIZE
              else:
                  buf_size = BUFFER_SIZE // 2
              while bytes_remaining > 0:
                  read_size = min(bytes_remaining, buf_size)
                  buf = src_file.read(read_size)
                  if HAS_BUFFER:
                      sys.stdout.buffer.write(buf)
                  else:
                      sys.stdout.write(ubinascii.hexlify(buf))
                  bytes_remaining -= read_size
                  # Wait for an ack so we don't get ahead of the remote
                  while True:
                      char = sys.stdin.read(1)
                      if char:
                          if char == '\x06':
                              break
                          # This should only happen if an error occurs
                          sys.stdout.write(char)
          return True
      except:
          return False
docs: Function which runs on the pyboard. Matches up with recv_file_from_remote.