parameters: (prefixes=None)
return_statement: return sitepackages
docstring: Returns a list containing all global site-packages directories.
  
      For each directory present in ``prefixes`` (or the global ``PREFIXES``),
      this function will find its `site-packages` subdirectory depending on the
      system environment, and will return a list of full paths.
docstring_summary: Returns a list containing all global site-packages directories.
docstring_tokens: Returns a list containing all global site - packages directories .
function: def getsitepackages(prefixes=None):
      """Returns a list containing all global site-packages directories.
  
      For each directory present in ``prefixes`` (or the global ``PREFIXES``),
      this function will find its `site-packages` subdirectory depending on the
      system environment, and will return a list of full paths.
      """
      sitepackages = []
      seen = set()
  
      if prefixes is None:
          prefixes = PREFIXES
  
      for prefix in prefixes:
          if not prefix or prefix in seen:
              continue
          seen.add(prefix)
  
          libdirs = [sys.platlibdir]
          if sys.platlibdir != "lib":
              libdirs.append("lib")
  
          if os.sep == '/':
              for libdir in libdirs:
                  path = os.path.join(prefix, libdir,
                                      "python%d.%d" % sys.version_info[:2],
                                      "site-packages")
                  sitepackages.append(path)
          else:
              sitepackages.append(prefix)
  
              for libdir in libdirs:
                  path = os.path.join(prefix, libdir, "site-packages")
                  sitepackages.append(path)
      return sitepackages
function_tokens: def getsitepackages ( prefixes = None ) : sitepackages = [ ] seen = set ( ) if prefixes is None : prefixes = PREFIXES for prefix in prefixes : if not prefix or prefix in seen : continue seen . add ( prefix ) libdirs = [ sys . platlibdir ] if sys . platlibdir != "lib" : libdirs . append ( "lib" ) if os . sep == '/' : for libdir in libdirs : path = os . path . join ( prefix , libdir , "python%d.%d" % sys . version_info [ : 2 ] , "site-packages" ) sitepackages . append ( path ) else : sitepackages . append ( prefix ) for libdir in libdirs : path = os . path . join ( prefix , libdir , "site-packages" ) sitepackages . append ( path ) return sitepackages