Re: [Pyobjc-dev] Using C Datatypes
Brought to you by:
ronaldoussoren
|
From: Ronald O. <ron...@ma...> - 2009-10-09 20:20:31
|
Jan,
- how does it not work?
- which version of pyobjc are you using?
- and on which os-release?
Ronald
On 9 okt 2009, at 20:04, Jan-Hendrik Hanne <j-h...@tu...> wrote:
> Hi!
>
> Ronald Oussoren wrote:
>> On Friday, October 09, 2009, at 04:53PM, "Jan-Hendrik Hanne" <j-h...@tu...
>> > wrote:
>>> Hi!
>>>
>>> Maybe this question was answered before, but I couldn't find it in
>>> the archive.
>>> How can I use C data types in Python?
>>> Concrete: I want to use
>>> - (NSInteger)write:(const uint8_t *)buffer maxLength:(NSUInteger)
>>> length
>>> of the NSOutputStream class.
>>> How can I create the buffer?
>> The buffer should be a python string, or another type that
>> implements the buffer protocol (an array.array of bytes should
>> therefore also work).
>> That is:
>> aStream.write_maxLength_("hello world", 10)
>
> Thank you for your fast answer. Unfortunately, it doesn't work with
> a string. I decided to write the file in the python way. Hopefully
> it is fast enough.
>
> Jan
>
>> Ronald
>>> Thanks
>>> Jan
>>>
>>> ---
>>> ---
>>> ---
>>> ---
>>> ------------------------------------------------------------------
>>> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
>>> is the only developer event you need to attend this year.
>>> Jumpstart your
>>> developing skills, take BlackBerry mobile applications to market
>>> and stay ahead of the curve. Join us from November 9 - 12, 2009.
>>> Register now!
>>> http://p.sf.net/sfu/devconference
>>> _______________________________________________
>>> Pyobjc-dev mailing list
>>> Pyo...@li...
>>> https://lists.sourceforge.net/lists/listinfo/pyobjc-dev
>>>
>>>
>
|