import logging
import logging.handlers
logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG)
ntl = logging.handlers.NTEventLogHandler("Testing Python")
logger.addHandler(ntl)
data = "Hello World!"
logger.info(data)
Works fine when executed with py32\Python-Portable.exe but not when executed with py32\App\PythonW.exe (I can't try py32\PythonW-Portable.exe because it's missing).
I suppose it has something to do with the environment variables set by the launchers or something else than makes the win32 extensions unavailable, but I have no idea of what to set or how to avoid this problem.