def current(sam=False):
 try:
  if sam:
   user_name = win32api.GetUserNameEx(win32con.NameSamCompatible)
  else:
   user_name = win32api.GetUserName()
 except pywintypes.error as exc:
  (number, context, message) = exc
  log.error('Failed to get current user')
  log.error('nbr: {0}'.format(number))
  log.error('ctx: {0}'.format(context))
  log.error('msg: {0}'.format(message))
  return False
 if (not user_name):
  return False
 return user_name

def current ( sam = False ) : try : if sam : user_name = win32api . GetUserNameEx ( win32con . NameSamCompatible ) else : user_name = win32api . GetUserName ( ) except pywintypes . error as exc : ( number , context , message ) = exc log . error ( 'Failed to get current user' ) log . error ( 'nbr: {0}' . format ( number ) ) log . error ( 'ctx: {0}' . format ( context ) ) log . error ( 'msg: {0}' . format ( message ) ) return False if ( not user_name ) : return False return user_name
retrieve information on the logged-in user from plotly .