Making Windows DLL detection more robust.
Making Windows DLL detection more robust.

Both Ben Doerr and Zach had fixes for this. Zach's is the one that this
is based on with a bit more added robustness (using %SYSTEMROOT% prior
to using C:\Windows as a fallback). Ben's additional locations have been
added. yak^ on irc:irc.freenode.net/#python suggests using sys.dllhandle
with ctypes, thus:

  import sys
  from ctypes import *

  name = create_string_buffer(256)
  windll.kernel32.GetModuleFileNameA(sys.dllhandle, name, 256)
  print name.value

It returns C:\Windows\System32\python27.dll on his system.

halostatue/rubypython,halostatue/rubypython,newcontext/rubypython,newcontext/rubypython,halostatue/rubypython,newcontext/rubypython