[Tutor] Can you modify every nth item in a list with a single assignment?
R. Alan Monroe
R. Alan Monroe" <amonroe@columbus.rr.com
Sat Jun 14 09:37:36 2003
> R. Alan Monroe wrote:
>>>What is your goal here?
>>I'd like to, for instance, draw a column of pixels in a 2d video
>>buffer that's implemented as a 1d array.
> Any particularly compelling reason to implement this as a 1d array?
You may have missed some of my earlier emails on this... I'm calling
python from a C dll so I can play with vis plugins for Sonique in
Python. So I can't change that aspect of the implementation. Python
interprets the buffer object as a long string.
Unless there is a way to convert from string to 2d array, then back
again? (Ideally without copying the whole thing and copying it back -
doing that would send framerates down the drain, I'm guessing)
I will try to post my code on my website in the next few days.
Alan