Hi Thijs, On Wed, 21 Dec 2011 16:21:02 +0100, Thijs Withaar <[email protected]> wrote: > the ATI drivers don't have a problem with it, but the code of the > previous mail > was tested on python 3.2, 32-bit (windows 7). > It doesn't work on python 2.7, 64-bit (windows 7). On that platform > GetShortPathNameW() always returns 0-sized strings. > Although the changes are not big, I don't have a universal solution. > I'll see about filing a bug-report with Nvidia. Until then, if someone > runs into > a similar problem, the following change makes it work on python 2.7: > > if exists(inc_path): > if sys.platform.count('win') > 0: > import ctypes > buf = '\0'*256 # for python 3.x change to : > bytes(256,'ascii') > n=ctypes.windll.kernel32.GetShortPathNameA( inc_path, > buf, 256 ) > inc_path = buf[:n] > return inc_path
I'm not sure what to do here. In principle I'm not opposed to working
around vendor bugs in PyOpenCL, as long as they're harmless for everyone
else.
If you would like to have this fix in PyOpenCL proper, can you please
send me a patch where you check for 32-bit ('tuple.__itemsize__ == 4' is
a reliable check) and use the right version of the code on each version
of Python ('if sys.version_info >= (3,)...')?
Thanks,
Andreas
pgpp7lXCVbDwE.pgp
Description: PGP signature
_______________________________________________ PyOpenCL mailing list [email protected] http://lists.tiker.net/listinfo/pyopencl
