A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2009-January/084785.html below:

[Python-Dev] ParseTuple question

[Python-Dev] ParseTuple question [Python-Dev] ParseTuple questionMark Hammond skippy.hammond at gmail.com
Sun Jan 4 00:01:37 CET 2009
On 2/01/2009 10:32 PM, Ulrich Eckhardt wrote:
> Hi!
>
> I'm looking at NullImporter_init in import.c and especially at the call to
> PyArg_ParseTuple there. What I'm wondering is what that call will do when I
> call the function with a Unicode object. Will it convert the Unicode to a
> char string first, will it return the Unicode object in a certain (default)
> encoding, will it fail?

PyArg_ParseTuple will fail if a unicode object is passed where a 's' 
format string is specified.

> I'm working on the MS Windows CE port, and I don't have stat() there. Also, I
> don't have GetFileAttributesA(char const*) there, so I need a wchar_t
> (UTF-16) string anyway. What would be the best way to get one?

On 'normal' windows you generally would need to use 
WideCharToMultiByte() to get a 'char *' version of your wchar string - 
but I expect you already know that, so I doubt I understand the question...

Cheers,

Mark
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4