def cursor(self):
    if not self._compile:
      raise AssertionError('No cursor available, this action does not support '
                           'cursors (try "fetch" instead)')
    try:
      if not self._compiled_query:
        return self._compiled_query
      if isinstance(self._compiled_query, Exception):
        raise self._compiled_query

      pb = datastore_pb.CompiledQuery()
      pb.set_keys_only(self._compiled_query.keys_only())
      if (self._compiled_query.has_primaryscan() and
          self._compiled_query.primaryscan().has_start_key()):
        start_key = self._compiled_query.primaryscan().start_key()
        start_inclusive = self._compiled_query.primaryscan().start_inclusive()
        primary_scan = pb.mutable_primaryscan()
        primary_scan.set_start_key(start_key)
        primary_scan.set_start_inclusive(start_inclusive)

      if self._compiled_query.has_offset():
        pb.set_offset(self._compiled_query.offset())

      return base64.urlsafe_b64encode(pb.Encode())
    except AttributeError:
      raise AssertionError('No cursor available, this query has not been '
                           'executed')
Do the copying.
dataset/ETHPy150Open CollabQ/CollabQ/.google_appengine/google/appengine/ext/db/__init__.py/_BaseQuery.cursor--crossover with--dataset/ETHPy150Open evennia/evennia/evennia/commands/default/building.py/CmdCpAttr.func