Re: Confessions of a Python fanboy

2009-07-30 Thread r
Traceback (most recent post last): File "", lines (13,14), in vector.reverse --> in-place vector.reversed --> in-place DumbMistakeError: Of course in python you would do... vector.reverse --> in-place vector.reversed --> new vector -- http://mail.python.org/mailman/listinfo/python-

Re: Confessions of a Python fanboy

2009-07-30 Thread Jean-Michel Pichavant
r wrote: On Jul 30, 11:31 am, Falcolas wrote: On Jul 29, 9:06 pm, r wrote: 1.) No need to use "()" to call a function with no arguments. Python --> "obj.m2().m3()" --ugly Ruby --> "obj.m1.m2.m3" -- sweeet! Man, i must admit i really like this, and your code will look so much clean

Re: Confessions of a Python fanboy

2009-07-30 Thread r
On Jul 30, 12:37 pm, Jean-Michel Pichavant wrote: > r wrote: > > On Jul 30, 11:31 am, Falcolas wrote: > > >> On Jul 29, 9:06 pm, r wrote: > > >>> 1.) No need to use "()" to call a function with no arguments. > >>> Python --> "obj.m2().m3()" --ugly > >>>   Ruby --> "obj.m1.m2.m3"  -- sweeet! > >>

Re: Bug in IEHtmlWindow?

2009-07-30 Thread Mike Driscoll
On Jul 30, 2:54 am, Massi wrote: > Hi everyone, I'm trying to use IEHtmlWindow in my application (python > 2.5, wxpython 2.8 on win xp). Everything is ok, but I encountered a > problem which also affects the demo. If I make a research on google a > strange message appears, saying (I'll try to tran

Re: Confessions of a Python fanboy

2009-07-30 Thread Carsten Haese
r wrote: > Of course in python you would do... > vector.reverse --> in-place > vector.reversed --> in-place You do know that only one of those works in-place, right? > The above example works pretty good, but this doesn't always "sound" > good. Take for example this... > point3d.offset -->

Re: Confessions of a Python fanboy

2009-07-30 Thread Tim Rowe
2009/7/30 r : > > Like your > first lay, your first programing language can leave an indelible mark > on you That's true. FOCAL scarred me for life. > but i now realize Ruby has some good > things going for it. Any language that gets any sort of real use has to have. For instance, I love Ada's n

Re: Confessions of a Python fanboy

2009-07-30 Thread Masklinn
On 30 Jul 2009, at 19:37 , Jean-Michel Pichavant wrote: r wrote: On Jul 30, 11:31 am, Falcolas wrote: On Jul 29, 9:06 pm, r wrote: 1.) No need to use "()" to call a function with no arguments. Python --> "obj.m2().m3()" --ugly Ruby --> "obj.m1.m2.m3" -- sweeet! Man, i must admit i reall

Re: Confessions of a Python fanboy

2009-07-30 Thread Masklinn
On 30 Jul 2009, at 19:42 , Carsten Haese wrote: r wrote: Of course in python you would do... vector.reverse --> in-place vector.reversed --> in-place You do know that only one of those works in-place, right? Well mostly because the other one doesn't exist (as python has `lst.reverse()` bu

Re: Confessions of a Python fanboy

2009-07-30 Thread superpollo
r wrote: On Jul 30, 12:15 pm, Masklinn wrote: [snip] Furthermore Ruby has a pretty nice convention (sadly not used enough I think) taken from Scheme where it's possible to postfix a method name with "!" (note: the "!" is part of the name, there's no magic) to indicate that this method mod

Re: Confessions of a Python fanboy

2009-07-30 Thread Falcolas
On Jul 30, 11:56 am, Masklinn wrote: > On 30 Jul 2009, at 19:37 , Jean-Michel Pichavant wrote: > > > r wrote: > > How do I know if foo.value is an attribute or if it is a method that   > > returns the foo value ? > > It cannot be an attribute. Ruby doesn't give access to attributes,   > they're a

Re: Confessions of a Python fanboy

2009-07-30 Thread superpollo
Tim Rowe wrote: 2009/7/30 r : Like your first lay, your first programing language can leave an indelible mark on you That's true. FOCAL scarred me for life. but i now realize Ruby has some good things going for it. Any language that gets any sort of real use has to have. For instance,

Re: Does python have the capability for driver development ?

2009-07-30 Thread Ethan Furman
Ben Finney wrote: "Martin P. Hellwig" writes: Machine Code: Whatever the machine executes, it could be that the CPU uses an abstraction of microcode to do this but from the perspective of the user, this is all done in the same 'black box' This requires, of course, defining what is the mach

class or thread id count

2009-07-30 Thread NighterNet
Need some help on doing some bit simple id count. It like every time it create a class or thread there is id++. Python 3.1 example: class ClientThread (threading.Thread): def __init__(self,clientSocket): threading.Thread.__init__(self) self.id += 1; Not sure it how it works. --

Re: Confessions of a Python fanboy

2009-07-30 Thread MRAB
superpollo wrote: r wrote: On Jul 30, 12:15 pm, Masklinn wrote: [snip] Furthermore Ruby has a pretty nice convention (sadly not used enough I think) taken from Scheme where it's possible to postfix a method name with "!" (note: the "!" is part of the name, there's no magic) to indicate t

Re: Confessions of a Python fanboy

2009-07-30 Thread Masklinn
On 30 Jul 2009, at 20:05 , superpollo wrote: r wrote: On Jul 30, 12:15 pm, Masklinn wrote: [snip] Furthermore Ruby has a pretty nice convention (sadly not used enough I think) taken from Scheme where it's possible to postfix a method name with "!" (note: the "!" is part of the name, the

Re: Confessions of a Python fanboy

2009-07-30 Thread Masklinn
On 30 Jul 2009, at 20:06 , Falcolas wrote: On Jul 30, 11:56 am, Masklinn wrote: On 30 Jul 2009, at 19:37 , Jean-Michel Pichavant wrote: r wrote: How do I know if foo.value is an attribute or if it is a method that returns the foo value ? It cannot be an attribute. Ruby doesn't give acces

Re: Confessions of a Python fanboy

2009-07-30 Thread Dave Angel
superpollo wrote: how to reverse a string in python? must i usa a temp? like: >>> s = "ciccio" >>> l = list(s) >>> l.reverse() >>> s = "".join(l) >>> s 'oiccic' >>> ??? bye simply s = s[::-1] DaveA -- http://mail.python.org/mailman/listinfo/python-list

Re: Confessions of a Python fanboy

2009-07-30 Thread superpollo
MRAB wrote: superpollo wrote: ... how to reverse a string in python? must i usa a temp? like: >>> s = "ciccio" >>> l = list(s) >>> l.reverse() >>> s = "".join(l) >>> s 'oiccic' >>> ??? Use slicing with a step of -1: >>> s = "ciccio" >>> s[::-1] 'oiccic' lol bye -- http://mail.py

Sorting dict by value w/ operator.itemgetter- using key name?

2009-07-30 Thread Wells Oliver
Bit of code: print sorted(results.items(), key=operator.itemgetter(1)) Would rather use 'H9', which is the name of the key in position 1 like: print sorted(results.items(), key=operator.itemgetter('H9')) Obviously that ain't work else I wouldn't be sending this email. Any tips? -- Wells Olive

Re: Help with Regex for domain names

2009-07-30 Thread Nobody
On Thu, 30 Jul 2009 10:29:09 -0700, rurpy wrote: >> regex = re.compile(r'[\w\-\.]+\.(?:us|au|de)') > > You might also want to consider that some country > codes such as "co" for Columbia might match more than > you want, for example: > > re.match(r'[\w\-\.]+\.(?:us|au|de|co)', 'foo.boo.com') >

calling obect method

2009-07-30 Thread srinivasan srinivas
Hi, I would like to know if i have an object and one of its methods as a string. How to call the method using this string? For ex If object is x and string y has one of its method names. x.value(y)() ---. Is there a way to do this? Thanks, Srini See the Web's breaking stories, chosen by

Re: New implementation of re module

2009-07-30 Thread Hrvoje Niksic
MRAB writes: > So it complains about: > > ++(RE_CHAR*)context->text_ptr > > but not about: > > ++info->repeat.count > > Does this mean that the gcc compiler thinks that the cast makes it an > rvalue? The cast operator does return an rvalue, treating it otherwise used to be an extension t

Re: calling obect method

2009-07-30 Thread r
>>> import math >>> getattr(math, 'hypot')(3,4) 5.0 -- http://mail.python.org/mailman/listinfo/python-list

Re: class or thread id count

2009-07-30 Thread r
On Jul 30, 1:13 pm, NighterNet wrote: > Need some help on doing some bit simple id count. It like every time > it create a class or thread there is id++. Python 3.1 > > example: > class ClientThread (threading.Thread): >    def __init__(self,clientSocket): >       threading.Thread.__init__(self) >

Re: socket send

2009-07-30 Thread Jan Kaliszewski
30-07-2009 o 05:52:06 NighterNet wrote: I am trying to figure out how to send text or byte in python 3.1. I am trying to send data to flash socket to get there. I am not sure how to work it. buff= 'id=' , self.id , ':balive=False\n' clientSock.send(buff); And what is the problem? *j -- Jan

os.path.exists() and Samba shares

2009-07-30 Thread BDZ
Hello. I have written a Python 3.1 script running on Windows that uses os.path.exists() to connect to network shares. If the various network shares require different user account and password combos than the account the script is running under the routine returns false. I need something like os.sam

Re: No PyPI search for 3.x compatible packages

2009-07-30 Thread Martin v. Löwis
Neil Hodgson wrote: >There appears to be no way to search PyPI for packages that are > compatible with Python 3.x. There are classifiers for 'Programming > Language' including 'Programming Language :: Python :: 3' but that seems > to be for implementation language since there are so many packag

Re: class or thread id count

2009-07-30 Thread NighterNet
On Jul 30, 12:14 pm, r wrote: > On Jul 30, 1:13 pm, NighterNet wrote: > > > Need some help on doing some bit simple id count. It like every time > > it create a class orthreadthere is id++. Python 3.1 > > > example: > > class ClientThread (threading.Thread): > >    def __init__(self,clientSocket)

Re: socket send

2009-07-30 Thread Jan Kaliszewski
30-07-2009 o 12:29:24 Francesco Bochicchio wrote: On Jul 30, 5:52 am, NighterNet wrote: I am trying to figure out how to send text or byte in python 3.1. I am trying to send data to flash socket to get there. I am not sure how to work it. buff= 'id=' , self.id , ':balive=False\n' clientSock.

Re: Confessions of a Python fanboy

2009-07-30 Thread Jan Kaliszewski
30-07-2009 o 13:36:49 Masklinn wrote: On 30 Jul 2009, at 06:04 , alex23 wrote: On Jul 30, 1:06 pm, r wrote: 2.) the .each method container.each{|localVar| block} This method can really cleanup some ugly for loops, although i really like the readability of for loops. map(lambda localVar: ,

Re: Confessions of a Python fanboy

2009-07-30 Thread Masklinn
On 30 Jul 2009, at 22:23 , Jan Kaliszewski wrote: 30-07-2009 o 13:36:49 Masklinn wrote: On 30 Jul 2009, at 06:04 , alex23 wrote: On Jul 30, 1:06 pm, r wrote: 2.) the .each method container.each{|localVar| block} This method can really cleanup some ugly for loops, although i really like t

Re: Confessions of a Python fanboy

2009-07-30 Thread Terry Reedy
superpollo wrote: r wrote: how to reverse a string in python? must i usa a temp? like: >>> s = "ciccio" >>> l = list(s) >>> l.reverse() >>> s = "".join(l) >>> s 'oiccic' >>> ??? No. >>> ''.join(list(reversed('abc'))) 'cba' >>> 'abc'[2::-1] 'cba' >>> 'abc'[10::-1] 'cba' Any i

Re: Sorting dict by value w/ operator.itemgetter- using key name?

2009-07-30 Thread Terry Reedy
Wells Oliver wrote: Bit of code: print sorted(results.items(), key=operator.itemgetter(1)) Would rather use 'H9', which is the name of the key in position 1 like: print sorted(results.items(), key=operator.itemgetter('H9')) Obviously that ain't work else I wouldn't be sending this email. Any

Re: Confessions of a Python fanboy

2009-07-30 Thread r
On Jul 30, 3:55 pm, Terry Reedy wrote: > superpollo wrote: > > r wrote: > > how to reverse a string in python? must i usa a temp? like: [snip] > Terry Jan Reedy No "r" never wrote anything like that. reversing a string is RTFM material, this is basic stuff here! Stop quoting me as saying things i

Re: Regexp problem

2009-07-30 Thread Ethan Furman
Marcus Wanner wrote: On 7/30/2009 9:32 AM, Beldar wrote: On 30 jul, 15:07, MRAB wrote: Beldar wrote: Hi there! I have a problem and i'm not very good at regular expressions. I have a text like "lalala lalala tiruri beldar-is-listening tiruri lalala" I need a regexp to get the 'beldar' part

Re: Help with Regex for domain names

2009-07-30 Thread MRAB
Nobody wrote: On Thu, 30 Jul 2009 10:29:09 -0700, rurpy wrote: regex = re.compile(r'[\w\-\.]+\.(?:us|au|de)') You might also want to consider that some country codes such as "co" for Columbia might match more than you want, for example: re.match(r'[\w\-\.]+\.(?:us|au|de|co)', 'foo.boo.com')

Re: Confessions of a Python fanboy

2009-07-30 Thread Emmanuel Surleau
> 1.) No need to use "()" to call a function with no arguments. > Python --> "obj.m2().m3()" --ugly > Ruby --> "obj.m1.m2.m3" -- sweeet! > Man, i must admit i really like this, and your code will look so much > cleaner. It has benefits - code does look better. It has also significant cons - it

Re: Regexp problem

2009-07-30 Thread MRAB
Ethan Furman wrote: Marcus Wanner wrote: On 7/30/2009 9:32 AM, Beldar wrote: On 30 jul, 15:07, MRAB wrote: Beldar wrote: Hi there! I have a problem and i'm not very good at regular expressions. I have a text like "lalala lalala tiruri beldar-is-listening tiruri lalala" I need a regexp to

Re: New implementation of re module

2009-07-30 Thread MRAB
Wolfgang Rohdewald wrote: On Thursday 30 July 2009, Wolfgang Rohdewald wrote: so I did the conversion mentioned there. This works: I actually do not know if it works - but it compiles. Yes, it works. I've updated my code accordingly and it'll be in the next release. -- http://mail.python.org

Re: os.path.exists() and Samba shares

2009-07-30 Thread Loïc Domaigné
Hi, > Hello. I have written a Python 3.1 script running on Windows that uses > os.path.exists() to connect to network shares. If the various network > shares require different user account and password combos than the > account the script is running under the routine returns false. I need > someth

Re: Confessions of a Python fanboy

2009-07-30 Thread r
On Jul 30, 4:29 pm, Emmanuel Surleau wrote: > > 1.) No need to use "()" to call a function with no arguments. > > Python --> "obj.m2().m3()" --ugly > >   Ruby --> "obj.m1.m2.m3"  -- sweeet! > > Man, i must admit i really like this, and your code will look so much > > cleaner. > > It has benefits -

Re: Confessions of a Python fanboy

2009-07-30 Thread Jan Kaliszewski
Dnia 30-07-2009 o 22:41:57 Masklinn napisał(a): On 30 Jul 2009, at 22:23 , Jan Kaliszewski wrote: 30-07-2009 o 13:36:49 Masklinn wrote: On 30 Jul 2009, at 06:04 , alex23 wrote: On Jul 30, 1:06 pm, r wrote: 2.) the .each method container.each{|localVar| block} This method can really clean

Re: Confessions of a Python fanboy

2009-07-30 Thread Luis Zarrabeitia
On Thursday 30 July 2009 04:41:57 pm Masklinn wrote: > On 30 Jul 2009, at 22:23 , Jan Kaliszewski wrote: > > 30-07-2009 o 13:36:49 Masklinn wrote: > > > > I don't see any real limitation. What's wrong in: > > > > for localVar in container: > >block > > Well what's wrong with using that rather

Re: calling obect method

2009-07-30 Thread Benjamin Kaplan
On Thu, Jul 30, 2009 at 3:04 PM, srinivasan srinivas < sri_anna...@yahoo.co.in> wrote: > Hi, > I would like to know if i have an object and one of its methods as a > string. How to call the method using this string? > For ex > If object is x and string y has one of its method names. > x.value(y)()

Re: New implementation of re module

2009-07-30 Thread MRAB
Piet van Oostrum wrote: MRAB (M) wrote: M> Hi all, M> I've been working on a new implementation of the re module. The details M> are at http://bugs.python.org/issue2636, specifically from M> http://bugs.python.org/issue2636#msg90954. I've included a .pyd file for M> Python 2.6 on Windows if y

Re: Confessions of a Python fanboy

2009-07-30 Thread r
On Jul 30, 4:57 pm, Luis Zarrabeitia wrote: [snip] > I'd like to ask, what "container.each" is, exactly? It looks like a function > call (as I've learned a few posts ago), but, what are its arguments? How the > looping "works"? Does it receive a "code" object that it has to execute? > Is .each som

Printing with colors in a portable way

2009-07-30 Thread Robert Dailey
Anyone know of a way to print text in Python 3.1 with colors in a portable way? In other words, I should be able to do something like this: print_color( "This is my text", COLOR_BLUE ) And this should be portable (i.e. it should work on Linux, Mac, Windows). -- http://mail.python.org/mailman/lis

Re: No PyPI search for 3.x compatible packages

2009-07-30 Thread Neil Hodgson
Francesco Bochicchio : > Are you sure? I note that for example pygtk has as language tags both > C and python. So maybe a C extension > for python3 would have both C and python 3 as language tags. > > I suspect that the 109 packages you found are the only ones obf the > 4829 which works with pyth

Re: [ANN] pyKook 0.0.2 - a simple build tool similar to Make or Ant

2009-07-30 Thread Дамјан Георгиевски
> I have released pyKook 0.0.2. > http://pypi.python.org/pypi/Kook/0.0.2 > http://www.kuwata-lab.com/kook/ > http://www.kuwata-lab.com/kook/pykook-users-guide.html How does it compare to http://code.google.com/p/fabricate/ and why is this problem (solution) reoccurring all the time -- дамјан (

Re: Confessions of a Python fanboy

2009-07-30 Thread Robert Kern
On 2009-07-30 16:44, r wrote: On Jul 30, 4:29 pm, Emmanuel Surleau wrote: 1.) No need to use "()" to call a function with no arguments. Python --> "obj.m2().m3()" --ugly Ruby --> "obj.m1.m2.m3" -- sweeet! Man, i must admit i really like this, and your code will look so much cleaner. It ha

Re: Printing with colors in a portable way

2009-07-30 Thread Rhodri James
On Thu, 30 Jul 2009 23:40:37 +0100, Robert Dailey wrote: Anyone know of a way to print text in Python 3.1 with colors in a portable way? In other words, I should be able to do something like this: print_color( "This is my text", COLOR_BLUE ) And this should be portable (i.e. it should work

Re: Printing with colors in a portable way

2009-07-30 Thread Jan Kaliszewski
31-07-2009 o 01:29:50 Rhodri James wrote: On Thu, 30 Jul 2009 23:40:37 +0100, Robert Dailey wrote: Anyone know of a way to print text in Python 3.1 with colors in a portable way? In other words, I should be able to do something like this: print_color( "This is my text", COLOR_BLUE ) And

Re: Run pyc file without specifying python path ?

2009-07-30 Thread Gabriel Genellina
En Thu, 30 Jul 2009 12:16:46 -0300, Unknown escribió: On 2009-07-30, Barak, Ron wrote: On second thoughts, I may have a problem implementing the wrapper solution, because my actual test_pyc.pyc, needs to parse its command line. Namely, the actual call to test_pyc.pyc looks something like th

Re: Confessions of a Python fanboy

2009-07-30 Thread Tim Rowe
2009/7/30 superpollo : > Tim Rowe wrote: >> Any language that gets any sort of real use has to have. For instance, >> I love Ada's numeric types (you can specify either the minimum number >> of significant figures or the maximum delta for a real type, and it >> will give you a type that satisfies

Non-blocking read with popen subprocess

2009-07-30 Thread Dhanesh
Hi , I am trying to use subprocess popen on a windows command line executable with spits messages on STDOUT as well as STDIN. Code snippet is as below :- ## sOut="" sErr="" javaLoaderPath = os.path.join("c:\\","Program

Confused About Python Loggin

2009-07-30 Thread Jannik Sundø
Dear all, I am quite confused about the Python logging. I have read and re-read the Python documentation for the Python logging module and googled, but to no avail. I simply want one logger to log to a file and another logger to log to the console. Neither should log the other's messages. T

Re: Confessions of a Python fanboy

2009-07-30 Thread Terry Reedy
r wrote: On Jul 30, 3:55 pm, Terry Reedy wrote: superpollo wrote: r wrote: how to reverse a string in python? must i usa a temp? like: [snip] Terry Jan Reedy No "r" never wrote anything like that. reversing a string is RTFM material, this is basic stuff here! Stop quoting me as saying thin

httplib headers

2009-07-30 Thread David Brochu
Using the following code I am trying to pass a header to my POST request. (Note: urls masked) file = sys.argv[0] url = sys.argv[1] conn = httplib.HTTPConnection("XX.XXX.XX.XXX",) headers = {'content-type':'application/xml'} conn.request("POST",url,file,headers) response = conn.getresponse() he

Re: Run pyc file without specifying python path ?

2009-07-30 Thread Aahz
In article , Chris Rebert wrote: > >No, with the shebang line (and assuming execute permissions on the >file), it would look like: > >./wrapper.py There's no reason to name it ".py"; you can have a perfectly useful "shell script" that just happens to list python on the shebang line instead of th

Re: httplib headers

2009-07-30 Thread MRAB
David Brochu wrote: Using the following code I am trying to pass a header to my POST request. (Note: urls masked) file = sys.argv[0] url = sys.argv[1] conn = httplib.HTTPConnection("XX.XXX.XX.XXX",) headers = {'content-type':'application/xml'} conn.request("POST",url,file,headers) response

Re: Non-blocking read with popen subprocess

2009-07-30 Thread Jonathan Gardner
On Jul 30, 5:24 pm, Dhanesh wrote: > > how can I we have a non blocking read ? See http://docs.python.org/library/popen2.html#flow-control-issues Note well: In the non-blocking world, you have to use select() or poll () to get your job done. You may want to look at "communicate" (http://docs.py

Generators through the C API

2009-07-30 Thread Lucas P Melo
Hello, I'm a total noob about the C API. Is there any way to create a generator function using the C API? I couldn't find anything like the 'yield' keyword in it. Thanks in advance. -- http://mail.python.org/mailman/listinfo/python-list

Re: Printing with colors in a portable way

2009-07-30 Thread Grant Edwards
On 2009-07-30, Robert Dailey wrote: > Anyone know of a way to print text in Python 3.1 with colors in a > portable way? In other words, I should be able to do something like > this: > > print_color( "This is my text", COLOR_BLUE ) > > And this should be portable (i.e. it should work on Linux, Mac,

Re: merge two png pic

2009-07-30 Thread cocobear
On Jul 29, 9:20 am, cocobear wrote: > Thistwopngfile has their own palette > > >>> im1.mode > 'P' > >>> im.mode > 'P' > >>> im.getpalette == im1.getpalette > > False > > I can use this code tomergetwopngpictogether: > > Map = Image.new("RGB", (x,y)) > Map.paste(im, box) > Map.paste(im1,box) > > Ma

Re: Confessions of a Python fanboy

2009-07-30 Thread I V
On Thu, 30 Jul 2009 17:57:48 -0400, Luis Zarrabeitia wrote: > As I understood the question, it was "was wrong in 'for var in > container' in comparison with ruby's container.each?" > > What's the (semantic) difference between > > for localVar in container: > block > > and > > container.each

Re: Confessions of a Python fanboy

2009-07-30 Thread Emmanuel Surleau
On Friday 31 July 2009 01:06:31 Robert Kern wrote: > On 2009-07-30 16:44, r wrote: > > On Jul 30, 4:29 pm, Emmanuel Surleau > > > > wrote: > >>> 1.) No need to use "()" to call a function with no arguments. > >>> Python --> "obj.m2().m3()" --ugly > >>>Ruby --> "obj.m1.m2.m3" -- sweeet! > >>>

Test for Pythonwin?

2009-07-30 Thread steve
Is there a good way to check if a script is running inside Pythonwin? Perhaps a property or method that is exposed by that environment? or, alternatively, is there a better place to ask :-) Steven -- http://mail.python.org/mailman/listinfo/python-list

Re: merge two png pic

2009-07-30 Thread Terry Reedy
cocobear wrote: On Jul 29, 9:20 am, cocobear wrote: Thistwopngfile has their own palette im1.mode 'P' im.mode 'P' im.getpalette == im1.getpalette False I can use this code tomergetwopngpictogether: Map = Image.new("RGB", (x,y)) Map.paste(im, box) Map.paste(im1,box) Map = Map.convert("

Re: merge two png pic

2009-07-30 Thread Peter Otten
cocobear wrote: > On Jul 29, 9:20 am, cocobear wrote: >> Thistwopngfile has their own palette >> >> >>> im1.mode >> 'P' >> >>> im.mode >> 'P' >> >>> im.getpalette == im1.getpalette >> >> False >> >> I can use this code tomergetwopngpictogether: >> >> Map = Image.new("RGB", (x,y)) >> Map.paste(im,

<    1   2