Comment 16 for bug 382709

Revision history for this message
John A Meinel (jameinel) wrote : Re: [Bug 382709] Re: invoking external diff failed for non-ascii files

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Martin wrote:
> Patch is wrong as it stands, due to a copy and paste error. With that
> fixed it basically works, but see the log attached for a bunch of other
> more subtle problems.
>
> Some replies to John's ponderings earlier in the bug:
>
>> It looks like CreateProcess should be part of the Kernel32.lib api, but
>> it certainly isn't exported via ctypes.windll.kernel32.
>
> You're forgetting to append the A/W here?
>
>> Which I'm a little bit surprised at, given that I thought CreateProcess
>> would always be a #define to CreateProcessW on unicode platforms, which
>> means the char* would be interpreted as a wchar_t *...
>
> Python (2 at least) builds with /D_MBCS not /D_UNICODE so that's the A
> version.
>
> Anyway, certainly it's possible to hack around subprocess sucking, and I
> have in the past, but really this needs fixing upstream.
>
> ** Attachment added: "Console session with 1.16-external_diff_encoded-382709 branch"
> http://launchpadlibrarian.net/28620049/external_diff_encoded.log
>

Well, I was confused because for other functions I get automatic
completion. So I can do "ctypes.windll.kernel32.C<tab>" and it tells me
"CreateConsoleScreenBuffer"

However, if I manually type CreateProcessW I get:
  <_FuncPtr object at 0x0233DA08>

So it seems to be available, just not loaded by default.

(copy & paste bug might just be launchpad's display of the code, you
might try the branch I linked)

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkpMXPUACgkQJdeBCYSNAAPgnQCePi6e7R6alW/WJXwmRYl7Kksh
MxMAoIlf71JFd8hx2GsnUEcq4c/evyzU
=FT1S
-----END PGP SIGNATURE-----