Pyslang: Passing data to embedded C function

Frank T. Sronce fsronce at myriad.net
Fri May 7 13:19:28 EDT 1999


Okay, maybe I'm just missing the obvious, here.  I've been using pyslang
for some ascii graphics (thanks to whoever suggested this package- I
wanted to thank you, but your post had disappeared from my browser for
some reason).

Anyway, I wanted to switch to using SLsmg_write_color_chars(), which
expects a pointer to a list of short ints where the first 8 bits are the
character and the second 8 bits are the color to use (I think), and an
integer telling it how many items are in the list.

Unfortunately, no matter what I pass it, I get an error.  Looking at the
C code, I think it's expecting a string of some sort which it'll convert
into a series of values, but I'm not sure how to set up the string.  

Can anyone clue me in on this?  I've tried the same stuff on both Linux
and Win95 (Linux screws up the terminal, Win95 just returns a
'TypeError') and I can't seem to get it to work.

Kiz




More information about the Python-list mailing list