load

attach.load(database=None, load_method='load_fit', load_multiple=False, **kwargs)

Load objects from a given database using the ID of the picked pixel.

The returned object(s) are accessible via m.cb.pick.get.picked_object.

Parameters:
  • database (any) – The database object to use for loading the object

  • load_method (str or callable) –

    If str: The name of the method to use for loading objects from the provided

    database (the call-signature used is database.load_method(ID))

    If callable: A callable that will be executed on the database with the

    following call-signature: load_method(database, ID)

  • load_multiple (bool) – True: A single-object is returned, replacing m.cb.picked_object on each pick. False: A list of objects is returned that is extended with each pick.