def SetupCore(searchPaths):
 import sys
 for path in searchPaths:
  sys.path.append(path)
 import string, os
 import regutil, win32api, win32con
 (installPath, corePaths) = LocatePythonCore(searchPaths)
 print corePaths
 regutil.RegisterNamedPath(None, string.join(corePaths, ';'))
 hKey = win32api.RegCreateKey(regutil.GetRootKey(), regutil.BuildDefaultPythonKey())
 try:
  win32api.RegSetValue(hKey, 'InstallPath', win32con.REG_SZ, installPath)
 finally:
  win32api.RegCloseKey(hKey)
 win32paths = ((os.path.abspath(os.path.split(win32api.__file__)[0]) + ';') + os.path.abspath(os.path.split(LocateFileName('win32con.py;win32con.pyc', sys.path))[0]))
 check = os.path.join(sys.prefix, 'PCBuild')
 if os.path.isdir(check):
  regutil.RegisterNamedPath('PCBuild', check)

def SetupCore ( searchPaths ) : import sys for path in searchPaths : sys . path . append ( path ) import string , os import regutil , win32api , win32con ( installPath , corePaths ) = LocatePythonCore ( searchPaths ) print corePaths regutil . RegisterNamedPath ( None , string . join ( corePaths , ';' ) ) hKey = win32api . RegCreateKey ( regutil . GetRootKey ( ) , regutil . BuildDefaultPythonKey ( ) ) try : win32api . RegSetValue ( hKey , 'InstallPath' , win32con . REG_SZ , installPath ) finally : win32api . RegCloseKey ( hKey ) win32paths = ( ( os . path . abspath ( os . path . split ( win32api . __file__ ) [ 0 ] ) + ';' ) + os . path . abspath ( os . path . split ( LocateFileName ( 'win32con.py;win32con.pyc' , sys . path ) ) [ 0 ] ) ) check = os . path . join ( sys . prefix , 'PCBuild' ) if os . path . isdir ( check ) : regutil . RegisterNamedPath ( 'PCBuild' , check )
setup the core python information in the registry .