def GenerateLibSig(short_name):
 with _UTILITY_LOCK:
  utilities_used = ', '.join([utility for utility in _utility_registry])
  _utility_registry.Clear()
 if utilities_used:
  return (' (%s, %s, %s, %s)' % (short_name, _COMMON_LIB_SIG, _PYTHON_VERSION, utilities_used))
 else:
  return (' (%s, %s, %s)' % (short_name, _COMMON_LIB_SIG, _PYTHON_VERSION))

def GenerateLibSig ( short_name ) : with _UTILITY_LOCK : utilities_used = ', ' . join ( [ utility for utility in _utility_registry ] ) _utility_registry . Clear ( ) if utilities_used : return ( ' (%s, %s, %s, %s)' % ( short_name , _COMMON_LIB_SIG , _PYTHON_VERSION , utilities_used ) ) else : return ( ' (%s, %s, %s)' % ( short_name , _COMMON_LIB_SIG , _PYTHON_VERSION ) )
generates a library signature suitable for a user agent field .