Re: Calling Objective C functions with ctypes
"Timothy W. Grove" <[email protected]> Thu, 19 Mar 2015 17:36:38 +0000
| Newsgroups | gmane.comp.python.ctypes |
|---|---|
| Message-ID | <[email protected]> |
Thanks! I preceded all of the string literals with 'b', apart from the initial 'find_library' calls, and the code worked fine. Best regards, Tim Grove On 19/03/2015 16:46, eryksun wrote: > On Thu, Mar 19, 2015 at 11:11 AM, Timothy W. Grove <[email protected]> wrote: >> pool = objc.objc_msgSend(pool, objc.sel_registerName('init')) > Python 3 uses wide-character strings (i.e. wchar_t *). Try replacing > all string literals with bytes literals, e.g. > objc.sel_registerName(b'init'). ------------------------------------------------------------------------------ Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ _______________________________________________ ctypes-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ctypes-users