print " ID:", user.getId() print " Username:"******" 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.
user = conn.getUser() print "Current user:"******" ID:", user.getId() print " Username:"******" 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() # The 'context' of our current session ctx = conn.getEventContext() # print ctx # for more info # Close connection: # ================================================================= # When you're done, close the session to free up server resources. conn._closeSession()