def RegisterCoreDLL(coredllName=None):
 if (coredllName is None):
  coredllName = win32api.GetModuleFileName(sys.dllhandle)
 else:
  try:
   os.stat(coredllName)
  except os.error:
   print ('Warning: Registering non-existant core DLL %s' % coredllName)
 hKey = win32api.RegCreateKey(GetRootKey(), BuildDefaultPythonKey())
 try:
  win32api.RegSetValue(hKey, 'Dll', win32con.REG_SZ, coredllName)
 finally:
  win32api.RegCloseKey(hKey)
 win32api.RegSetValue(GetRootKey(), 'Software\\Python\\PythonCore\\CurrentVersion', win32con.REG_SZ, sys.winver)

def RegisterCoreDLL ( coredllName = None ) : if ( coredllName is None ) : coredllName = win32api . GetModuleFileName ( sys . dllhandle ) else : try : os . stat ( coredllName ) except os . error : print ( 'Warning: Registering non-existant core DLL %s' % coredllName ) hKey = win32api . RegCreateKey ( GetRootKey ( ) , BuildDefaultPythonKey ( ) ) try : win32api . RegSetValue ( hKey , 'Dll' , win32con . REG_SZ , coredllName ) finally : win32api . RegCloseKey ( hKey ) win32api . RegSetValue ( GetRootKey ( ) , 'Software\\Python\\PythonCore\\CurrentVersion' , win32con . REG_SZ , sys . winver )
registers the core dll in the registry .