print " Full Name:", user.getFullName() print "Member of:" for g in conn.getGroupsMemberOf(): print " ID:", g.getName(), " Name:", g.getId() group = conn.getGroupFromContext() print "Current group: ", group.getName() print "Other Members of current group:" for exp in conn.listColleagues(): print " ID:", exp.getId(), exp.getOmeName(), " Name:", exp.getFullName() print "Owner of:" for g in conn.listOwnedGroups(): print " ID:", g.getName(), " Name:", g.getId() # New in OMERO 5 print "Admins:" for exp in conn.getAdministrators(): print " ID:", exp.getId(), exp.getOmeName(), " Name:", exp.getFullName() # The 'context' of our current session ctx = conn.getEventContext() # print ctx # for more info # Close connection: # ================================================================= # When you are done, close the session to free up server resources. conn._closeSession()
# List the group owners and other members owners, members = group.groupSummary() print(" Group owners:") for o in owners: print(" ID: %s UserName: %s Name: %s" % (o.getId(), o.getOmeName(), o.getFullName())) print(" Group members:") for m in members: print(" ID: %s UserName: %s Name: %s" % (m.getId(), m.getOmeName(), m.getFullName())) print("Owner of:") for g in conn.listOwnedGroups(): print(" ID: ", g.getId(), " Name:", g.getName()) # New in OMERO 5 print("Admins:") for exp in conn.getAdministrators(): print(" ID: %s UserName: %s Name: %s" % (exp.getId(), exp.getOmeName(), exp.getFullName())) # The 'context' of our current session ctx = conn.getEventContext() # print ctx # for more info # Close connection # ================ # When you are done, close the session to free up server resources. conn.close()