Hello,
I have a list of list
assume myList[x][y] is integer
I would like to create an alias to that list which I could call this
way:
alias[y][x] returns myList[x][y]
how can I do that ? (python 2.6)
(I have a feeling I should use 'property' ;)
Thanks,
--
--
If your alias can be read-only:
alias = zip(*myList)
a=[['00','01'],['10','11']]
l=zip(*a)
print(l)
returns... [('00', '10'), ('01', '11')]
IS NOT AT ALL WHAT I WANT ;-)
What I want is
print a[1][0]
'10'
but print l[1][0]
'01'
notice the indexes of the list l are inverted...
--
again I want:
alias[y][x] returns myList[x][y]
print a[1][0]
'10'
but print l[1][0]
'01'
notice the indexes of the list l are inverted...
--
http://mail.python.org/mailman/listinfo/python-list
heu the zip trick actually works... my mistake!
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
I'm trying to find some howto, tutorial in order to create a python program
that will allow plug-in programming. I've found various tutos on how to
write a plug-in for soft A or soft B but none telling me how to do it in my
own programs. Do you have any bookmarks ??
Regards,
Laurent.
--
Hi,
Does anybody know how to save an image in GIF format preserving transparent
background ??
Here's what I tested :
import Image, ImageDraw
im = Image.open('/path/to/model.gif') # An image with transparent backgroung
draw = ImageDraw.Draw(im)