logo       

Re: cast function, other ideas: msg#00014

python.ctypes

Subject: Re: cast function, other ideas

Thomas Heller wrote:

While we're on it, other functions that would be useful may be these
(iirc, Paul Moore had suggested something like this long time ago):
memcpy, strcpy, wcscpy.

memcpy and strcpy are already usable:

>>> import ctypes
>>> msvcrt = ctypes.cdll.msvcrt
>>> memcpy = msvcrt.memcpy
>>>
>>> a = 'abcde'
>>> b = '234'
>>>
>>> memcpy( a, b, 2 )
19376276
>>> a
'23cde'
>>>

I gave us more than you think :) THANKS!

Niki Spahiev


-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise