In <hsgl255g4curs2aekdb0i0lra4ho5hv...@4ax.com> pdlem...@earthlink.net writes:

>All attempts have failed.

>    import WConio
>    import array

>    screen = array.array('H',[0]*75,[0]*24) 
>                                  ERR  array takes at most 2 arguments

>    screen = array.array('H',[0]*75[0]*24)
>                                TypeErr  int object is unsubscriptable

>    screen = array.array('H',[0]*75)('H',[0]*24) 
>                                 ERR  object is not callable

>    screen - array.array('H',[0]*75*24)
>                Goes through but results are, of course, unacceptable 
>On-line docs and Programming in Python 3 are no help.
>Should I give up on arrays and use lists, or go to NumPy ? Thanks

I guess you could do something like

screen = [array.array('H', [0]*75) for i in range(24)]

but I doubt that the resulting structure would be that much more
efficient than the pure-list equivalent...

kynn -- lowest-of-the-low python noob
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to