inicio mail me! sindicaci;ón

Windows is driving me mad

I’m losing a lot of SoC time around Windows and it’s strange things. If I call _get_osfhandle passing a valid file descriptor I always get -1 (error code).

Mmm…

UPDATE: Tomas Heller saved me :-) Python 2.4 uses also another DLL (msvcr71.dll) for the C Runtime (CRT) instead of msvcrt.dll so it seems _get_osfhandle is not exported correctly in the usual one. The line:

[code lang="python"] cdll.msvcrt._get_osfhandle(f.fileno()) [/code]

becomes

[code lang="python"] cdll.msvc71._get_osfhandle(f.fileno()) [/code]

and tests passes!!! :-)

Related posts

  • About Reflector
  • Back on track
  • Windows vs. Linux
  • Windows is definitely more secure than Linux
  • Windows free live CD
  • Comments are closed.