# Get logged in user and project name
tagNames = ['[System]Client/User/Username', '[System]Client/System/ProjectName']
loggedInUser, loggedInProject = [tag.value for tag in system.tag.readBlocking(tagNames)]
# Get running sessions
sessionData = system.util.getSessionInfo()
# Sort the session dataset into a dictionay by project and user
sessionDict = {}
for row in sessionData:
# Ignore if designer session
if not row['isDesigner']:
if row['project'] not in sessionDict.keys():
sessionDict[row['project']] = {}
if row['username'] not in sessionDict[row['project']].keys():
sessionDict[row['project']][row['username']] = 1
else:
sessionDict[row['project']][row['username']] += 1
try:
print sessionDict[loggedInProject][loggedInUser]
except:
# Return None if not exists
print None