Re: GIF89A and PIL

2010-03-29 Thread Gregory Ewing
Stephen Hansen wrote: So I wonder if there's just some hyper-optimization Photoshop does that PIL can't round-trip. You may find that PIL isn't bothering to compress at all, or only doing it in a very simpleminded way. -- Greg -- http://mail.python.org/mailman/listinfo/python-list

Re: sum for sequences?

2010-03-29 Thread Alf P. Steinbach
* Steven D'Aprano: On Sun, 28 Mar 2010 18:56:26 +0200, Alf P. Steinbach wrote: From a more practical point of view, the sum efficiency could be improved by doing the first addition using '+' and the rest using '+=', without changing the behavior. But that would change the behaviour. The __iad

header intact

2010-03-29 Thread vamsi.v
> >confirm bec6a35eaf702fee07b1542f90784d939bbbebff > > -- http://mail.python.org/mailman/listinfo/python-list

I'm looking for html cleaner. Exa mple : convert my title => my title…

2010-03-29 Thread Stéphane Klein
Hi, I work on HTML cleaner. I export OpenOffice.org documents to HTML. Next, I would like clean this HTML export files : * remove comment * remove style * remove dispensable tag * ... some difficulty : * convert my text foo bar => my text foo par * convert my title => my title to do this pro

Re: I'm looking for html cleaner. Example : convert my title => my title…

2010-03-29 Thread Harishankar
On Mon, 29 Mar 2010 10:12:09 +0200, Stéphane Klein wrote: > Hi, > > I work on HTML cleaner. > > I export OpenOffice.org documents to HTML. Next, I would like clean this > HTML export files : > > * remove comment > * remove style > * remove dispensable tag > * ... > > some difficulty : > > * c

refer to self in a decorator on a class method

2010-03-29 Thread Yuccaplant
Hi all, I would like to do something like this: class HelloWorld (object): def __init__(self,clk): self.clk = clk @always(self.clk.posedge) def sayHello(self): print "%s Hello World!" % now() Problem is however I can't refer

Re: refer to self in a decorator on a class method

2010-03-29 Thread Peter Otten
Yuccaplant wrote: > Hi all, > > I would like to do something like this: > > > class HelloWorld (object): > > def __init__(self,clk): > self.clk = clk > > @always(self.clk.posedge) > def sayHello(self): > print "%s Hello World!" % now() > ***

Re: Have you embraced Python 3.x yet?

2010-03-29 Thread David Cournapeau
On Sat, Mar 27, 2010 at 5:26 AM, Chris Colbert wrote: > > I won't switch until NumPy and SciPy make the jump. We're almost there, though (mostly thanks to other people's work on Numpy): http://github.com/cournape/scipy3/branches/py3k David -- http://mail.python.org/mailman/listinfo/python-lis

Re: the Python Foundation

2010-03-29 Thread Mark Tarver
On 24 Mar, 22:18, "Steve Holden, Chairman, PSF" wrote: > MarkTarver wrote: > >>From the website > > > The Python Software Foundation (PSF) is a 501(c)(3) non-profit > > corporation that > > holds the intellectual property rights behind the Python programming > > language. We manage the open source

Python magazine

2010-03-29 Thread Pasi Oja-Nisula
Python magazine web site says this: "So, sit back and relax - enjoy your holidays, and come see us again on January 26th, when the new PyMag will launch." Anyone heard any rumours or anything? I quite liked the magazine. Pasi -- http://mail.python.org/mailman/listinfo/python-list

Re: Python magazine

2010-03-29 Thread Jaap van Wingerde
On 29 mrt, 13:13, Pasi Oja-Nisula wrote: > Python magazine web site says this: > "So, sit back and relax - enjoy your holidays, and come see us again on > January 26th, when the new  PyMag will launch." -- http://mail.python.org/mailm

Re: Have you embraced Python 3.x yet?

2010-03-29 Thread Ben Finney
David Cournapeau writes: > On Sat, Mar 27, 2010 at 5:26 AM, Chris Colbert wrote: > > I won't switch until NumPy and SciPy make the jump. > > We're almost there, though (mostly thanks to other people's work on > Numpy): > > http://github.com/cournape/scipy3/branches/py3k Are you maintaining sepa

Re: Have you embraced Python 3.x yet?

2010-03-29 Thread David Cournapeau
On Mon, Mar 29, 2010 at 9:43 PM, Ben Finney wrote: > David Cournapeau writes: > >> On Sat, Mar 27, 2010 at 5:26 AM, Chris Colbert wrote: >> > I won't switch until NumPy and SciPy make the jump. >> >> We're almost there, though (mostly thanks to other people's work on >> Numpy): >> >> http://gith

Re: Why this Difference in Importing NumPy 1.2 vs 1.4?

2010-03-29 Thread W. eWatson
Add/Remove under Control Panel. It's a numpy problem. On 3/28/2010 9:20 AM, W. eWatson wrote: I wrote a program in Python 2.5 under Win7 and it runs fine using Numpy 1.2 , but not on a colleague's machine who has a slightly newer 2.5 and uses NumPy 1.4. We both use IDLE to execute the program. D

Re: OT: Meaning of "monkey"

2010-03-29 Thread djc
Mensanator wrote: > On Mar 26, 2:44 pm, Phlip wrote: >> On Mar 26, 6:14 am, Luis M. González wrote: >> >>> Webmonkey, Greasemonkey, monkey-patching, Tracemonkey, Jägermonkey, >>> Spidermonkey, Mono (monkey in spanish), codemonkey, etc, etc, etc... >>> Monkeys everywhere. >>> Sorry for the off top

Re: OT: Meaning of "monkey"

2010-03-29 Thread Bruno Desthuilliers
djc a écrit : and never call the Librarian a monkey ook ?!? -- http://mail.python.org/mailman/listinfo/python-list

Re: OT: Meaning of "monkey"

2010-03-29 Thread Krister Svanlund
On Mon, Mar 29, 2010 at 3:09 PM, djc wrote: > Mensanator wrote: >> On Mar 26, 2:44 pm, Phlip wrote: >>> On Mar 26, 6:14 am, Luis M. González wrote: >>> Webmonkey, Greasemonkey, monkey-patching, Tracemonkey, Jägermonkey, Spidermonkey, Mono (monkey in spanish), codemonkey, etc, etc, etc.

Matplotlib patches collection + alpha face

2010-03-29 Thread Pierre
Hello, I would like to draw on the same axes several patches (rectangle) with different alpha-face (transparency)... Anyone has an idea ? In particular, I would like to use the class PatchCollection but it seems that the alpha property is common to all the patches... Thanks for your help. -- htt

Re: How to verify a signature using SHA1WithRSA with python

2010-03-29 Thread geremy condra
On Mon, Mar 29, 2010 at 2:42 AM, Gao wrote: > I have a public key, and I want to write a method that verify a string which > is a signature signed by this public key's private key. And is M2Crypto I > can't find algorithm named "SHA1WithRSA" or so . Could anyone help me? > -- > http://mail.python.

Re: sum for sequences?

2010-03-29 Thread Patrick Maupin
On Mar 28, 9:45 pm, Steven D'Aprano wrote: > And what about tuples? And subclasses of list/tuples? How many different > types need to be optimized? One of the beautiful things about Python is that, for most things, there are few surprises for even new users. "There should be one obvious way to d

Re: sum for sequences?

2010-03-29 Thread Steve Howell
On Mar 29, 7:40 am, Patrick Maupin wrote: > On Mar 28, 9:45 pm, Steven D'Aprano > > wrote: > > And what about tuples? And subclasses of list/tuples? How many different > > types need to be optimized? > > One of the beautiful things about Python is that, for most things, > there are few surprises

Newbie question: Tuples and reading csv files

2010-03-29 Thread Gryff
Hi Its been 20 years since I programmed, so I'm stepping back in via Python. However I'm beating my brains on tuples/lists (what I used to know as arrays). I've fooled around with small code snippets and tried a few things, but I can't figure out how to grab elements of tuples ... For example, I'

Re: Newbie question: Tuples and reading csv files

2010-03-29 Thread Steve Howell
On Mar 29, 8:31 am, Gryff wrote: > Hi > > Its been 20 years since I programmed, so I'm stepping back in via > Python. However I'm beating my brains on tuples/lists (what I used to > know as arrays). I've fooled around with small code snippets and tried > a few things, but I can't figure out how to

Re: Newbie question: Tuples and reading csv files

2010-03-29 Thread Kushal Kumaran
On Mon, Mar 29, 2010 at 9:01 PM, Gryff wrote: > Hi > > Its been 20 years since I programmed, so I'm stepping back in via > Python. However I'm beating my brains on tuples/lists (what I used to > know as arrays). I've fooled around with small code snippets and tried > a few things, but I can't figu

Re: OT: Meaning of "monkey"

2010-03-29 Thread Den
On Mar 26, 6:14 am, Luis M. González wrote: > Webmonkey, Greasemonkey, monkey-patching, Tracemonkey, Jägermonkey, > Spidermonkey, Mono (monkey in spanish), codemonkey, etc, etc, etc... > > Monkeys everywhere. > Sorry for the off topic question, but what does "monkey" mean in a > nerdy-geek context

Re: Newbie question: Tuples and reading csv files

2010-03-29 Thread Gryff
*tada!* *enlightenment* Thanks - I figured it was something simple :-) -- http://mail.python.org/mailman/listinfo/python-list

Jython as an alternative to Python

2010-03-29 Thread Tim Johnson
FYI: I've used python for years primarily on *nix platforms and primarily for web programming. I'm considering studying a scripting language that uses and accesses java. My first obvious choice would by jython. The following questions could probably be answered by pointers to previous discussions,

Re: pythoncom.CoInitialize() not recognised in Eclipse

2010-03-29 Thread KB
On Mar 28, 8:16 pm, Jason Scheirer wrote: > On Mar 28, 7:14 pm, KB wrote: > > > > > Hi there, > > > I have in the past used PythonWin to write python for COM, and > > switched to Eclipse. > > > I am getting an error from the IDE saying it does not recognise > > CoInitialize(): > > > > > impo

Re: pythoncom.CoInitialize() not recognised in Eclipse

2010-03-29 Thread KB
On Mar 28, 10:59 pm, "Dieter Verfaillie" wrote: > Quoting KB : > > > I am getting an error from the IDE saying it does not recognise > > CoInitialize(): > > > > > import pythoncom > > > pythoncom.CoInitialize() > > pythoncom.CoUninitialize() > > > > It works out of the box with PyDev 1.5

Re: Jython as an alternative to Python

2010-03-29 Thread Steve Holden
Tim Johnson wrote: > FYI: I've used python for years primarily on *nix platforms and > primarily for web programming. I'm considering studying a scripting > language that uses and accesses java. My first obvious choice would by > jython. The following questions could probably be answered by pointer

Re: Re: Super() function

2010-03-29 Thread Gabriel Genellina
En Sun, 28 Mar 2010 21:58:07 -0300, Delaney, Timothy (Tim) escribió: Gabriel Genellina wrote: Alan Harris-Reid escribió: Using Python 3.1, I sometimes use the super() function to call the equivalent method from a parent class, for example def mymethod(self): super().mymethod() some

Re: Jython as an alternative to Python

2010-03-29 Thread Tim Johnson
On 2010-03-29, Steve Holden wrote: > Tim Johnson wrote: <<.>> 1)What can jython *do* that cannot be done by python. >> > Import Java classes and instantiate them, calling their methods from Python. Of course >> 2)What is the current state of jython as a development community? >> I.E. is it bei

"Usability, the Soul of Python"

2010-03-29 Thread Jonathan Hayward
I've posted "Usability, the Soul of Python: An Introduction to the Python Programming Language Through the Eyes of Usability", at: http://JonathansCorner.com/python/ The basic suggestion is that much of what works well in Python has something to do with the usability it offers programmers. En

Re: "Usability, the Soul of Python"

2010-03-29 Thread Phlip
Jonathan Hayward wrote: > I've posted "Usability, the Soul of Python: An Introduction to the > Python Programming Language Through the Eyes of Usability", at: > >    http://JonathansCorner.com/python/ > > The basic suggestion is that much of what works well in Python has > something to do with the

"jobs in saudi arabia" "jobs in saudi arabia for pakistanis" "jobs in saudi arabia banks" "jobs in saudi" "jobs in saudi airline" "jobs in saudi telecom" "saudi arabia jobs "on http://jobsinsaudiarabi

2010-03-29 Thread saima81
"jobs in saudi arabia" "jobs in saudi arabia for pakistanis" "jobs in saudi arabia banks" "jobs in saudi" "jobs in saudi airline" "jobs in saudi telecom" "saudi arabia jobs "on http://jobsinsaudiarabia-net.blogspot.com/ "jobs in saudi arabia" "jobs in saudi arabia for pakistanis" "jobs in saudi ara

Re: I'm looking for html cleaner. Example : convert my title => < h1>my title…

2010-03-29 Thread Stefan Behnel
Stéphane Klein, 29.03.2010 10:12: I work on HTML cleaner. I export OpenOffice.org documents to HTML. Next, I would like clean this HTML export files : * remove comment * remove style * remove dispensable tag * ... some difficulty : * convert my text foo bar => my text foo par * convert my tit

Re: OT: Meaning of "monkey"

2010-03-29 Thread Gib Bogle
I prefer to think of myself as a code-ape - I look down on code-monkeys. -- http://mail.python.org/mailman/listinfo/python-list

Re: sum for sequences?

2010-03-29 Thread Steven D'Aprano
On Mon, 29 Mar 2010 07:40:54 -0700, Patrick Maupin wrote: > On Mar 28, 9:45 pm, Steven D'Aprano > wrote: >> And what about tuples? And subclasses of list/tuples? How many >> different types need to be optimized? > > One of the beautiful things about Python is that, for most things, there > are f

RE: Re: Super() function

2010-03-29 Thread Delaney, Timothy (Tim)
Gabriel Genellina write: > En Sun, 28 Mar 2010 21:58:07 -0300, Delaney, Timothy (Tim) > escribió: >>> Gabriel Genellina wrote: Alan Harris-Reid escribió: > Using Python 3.1, I sometimes use the super() function to call the > equivalent method from a parent class, for example

Re: sum for sequences?

2010-03-29 Thread Steven D'Aprano
On Mon, 29 Mar 2010 08:12:00 -0700, Steve Howell wrote: > On Mar 29, 7:40 am, Patrick Maupin wrote: >> On Mar 28, 9:45 pm, Steven D'Aprano >> >> wrote: >> > And what about tuples? And subclasses of list/tuples? How many >> > different types need to be optimized? >> >> One of the beautiful things

Re: sum for sequences?

2010-03-29 Thread Paul Rubin
Steven D'Aprano writes: > * Iterating over an arbitrary sequence of arbitrary sequences? > Use itertools.chain. chain is only for finite sequences. For arbitrary sequences, use chain.from_iterable. -- http://mail.python.org/mailman/listinfo/python-list

Re: OT: Meaning of "monkey"

2010-03-29 Thread Mensanator
On Mar 29, 5:31 pm, Gib Bogle wrote: > I prefer to think of myself as a code-ape - I look down on code-monkeys. Why? They have prehensile tails. -- http://mail.python.org/mailman/listinfo/python-list

Re: "Usability, the Soul of Python"

2010-03-29 Thread John Nagle
Jonathan Hayward wrote: I've posted "Usability, the Soul of Python: An Introduction to the Python Programming Language Through the Eyes of Usability", at: http://JonathansCorner.com/python/ No, it's just a rather verbose introduction to Python, in dark brown type on a light brown backgro

Re: I'm looking for html cleaner. Example : convert my title => < h1>my title…

2010-03-29 Thread John Nagle
Stéphane Klein wrote: Hi, I work on HTML cleaner. I export OpenOffice.org documents to HTML. Next, I would like clean this HTML export files : * remove comment * remove style * remove dispensable tag * ... Try parsing with HTML5 Parser ("http://code.google.com/p/html5lib/";) which is the

decorators only when __debug__ == True

2010-03-29 Thread LX
Hi all, I have a question about decorators. I would like to use them for argument checking, and pre/post conditions. However, I don't want the additional overhead when I run in non-debug mode. I could do something like this, using a simple trace example. @decorator def pass_decorator(f, *args, **

Re: xml-rpc

2010-03-29 Thread Brian Quinlan
On Mar 14, 2010, at 12:14 AM, ahmet erdinc yilmaz wrote: Hello, Recenetly we are developing a senior project and decide to use xmlrpclib. However I have some questions. In the documentation I could not find any clue about handling requests? Does the server handles each request in a separ

Re: decorators only when __debug__ == True

2010-03-29 Thread MRAB
LX wrote: Hi all, I have a question about decorators. I would like to use them for argument checking, and pre/post conditions. However, I don't want the additional overhead when I run in non-debug mode. I could do something like this, using a simple trace example. @decorator def pass_decorator(

Re: sum for sequences?

2010-03-29 Thread Steve Howell
On Mar 29, 4:38 pm, Steven D'Aprano wrote: > On Mon, 29 Mar 2010 08:12:00 -0700, Steve Howell wrote: > > On Mar 29, 7:40 am, Patrick Maupin wrote: > >> On Mar 28, 9:45 pm, Steven D'Aprano > > >> wrote: > >> > And what about tuples? And subclasses of list/tuples? How many > >> > different types n

Re: decorators only when __debug__ == True

2010-03-29 Thread Steven D'Aprano
On Mon, 29 Mar 2010 17:54:26 -0700, LX wrote: > Hi all, I have a question about decorators. I would like to use them for > argument checking, and pre/post conditions. However, I don't want the > additional overhead when I run in non-debug mode. I could do something > like this, using a simple trac

Re: sum for sequences?

2010-03-29 Thread Patrick Maupin
On Mar 29, 6:19 pm, Steven D'Aprano wrote: > How does the existence of math.fsum contradict the existence of sum? You're exceptionally good at (probably deliberately) mis-interpreting what people write. Regards, Pat -- http://mail.python.org/mailman/listinfo/python-list

Re: sum for sequences?

2010-03-29 Thread Patrick Maupin
On Mar 29, 6:38 pm, Steven D'Aprano wrote: > With a very few exceptions (e.g. dict lookup being "usually" O(1), list > append being amortized O(1)), Python makes no promises about performance. > It's not part of the language. If you, the programmer, are making any > assumptions about performance t

Re: sum for sequences?

2010-03-29 Thread Steve Howell
On Mar 29, 4:19 pm, Steven D'Aprano wrote: > On Mon, 29 Mar 2010 07:40:54 -0700, Patrick Maupin wrote: > > On Mar 28, 9:45 pm, Steven D'Aprano > > wrote: > >> And what about tuples? And subclasses of list/tuples? How many > >> different types need to be optimized? > > > One of the beautiful thing

Re: sum for sequences?

2010-03-29 Thread Steven D'Aprano
On Mon, 29 Mar 2010 19:05:30 -0700, Steve Howell wrote: >> > If nothing else, I think it's reasonably for users to expect >> > symmetry. >> >> Why? What is symmetry in programming? > > "Symmetry" is best shown by example. > > >>> 3 - 2 > 1 > >>> set([1,2,3]) - set([2,3]) > set([1]) That's

Re: sum for sequences?

2010-03-29 Thread Steven D'Aprano
On Mon, 29 Mar 2010 16:36:17 -0700, Paul Rubin wrote: > Steven D'Aprano writes: >> * Iterating over an arbitrary sequence of arbitrary sequences? >> Use itertools.chain. > > chain is only for finite sequences. For arbitrary sequences, use > chain.from_iterable. Correction noted. Obviously I'

Re: sum for sequences?

2010-03-29 Thread Steven D'Aprano
On Mon, 29 Mar 2010 19:24:42 -0700, Patrick Maupin wrote: > On Mar 29, 6:19 pm, Steven D'Aprano cybersource.com.au> wrote: >> How does the existence of math.fsum contradict the existence of sum? > > You're exceptionally good at (probably deliberately) mis-interpreting > what people write. I can

Re: sum for sequences?

2010-03-29 Thread Patrick Maupin
On Mar 29, 10:29 pm, Steven D'Aprano wrote: > On Mon, 29 Mar 2010 19:24:42 -0700, Patrick Maupin wrote: > > On Mar 29, 6:19 pm, Steven D'Aprano > cybersource.com.au> wrote: > >> How does the existence of math.fsum contradict the existence of sum? > > > You're exceptionally good at (probably delib

Re: sum for sequences?

2010-03-29 Thread Steve Howell
On Mar 29, 8:01 pm, Steven D'Aprano wrote: > You don't define symmetry. You don't even give a sensible example of > symmetry. Consequently I reject your argument that because sum is the > obvious way to sum a lot of integers, "symmetry" implies that it should > be the obvious way to concatenate a

Re: sum for sequences?

2010-03-29 Thread Steven D'Aprano
On Mon, 29 Mar 2010 19:31:44 -0700, Patrick Maupin wrote: > It's about a lack of surprises. Which, 99% of the time, Python excels > at. This is why many of us program in Python. This is why some of us > who would never use sum() on lists, EVEN IF IT WERE FIXED TO NOT BE SO > OBNOXIOUSLY SLOW, a

Re: GIF89A and PIL

2010-03-29 Thread Gabriel Genellina
En Mon, 29 Mar 2010 04:41:23 -0300, Gregory Ewing escribió: Stephen Hansen wrote: So I wonder if there's just some hyper-optimization Photoshop does that PIL can't round-trip. You may find that PIL isn't bothering to compress at all, or only doing it in a very simpleminded way. Indeed. F

Re: xpat error in xmlrp client. How to inspect data.

2010-03-29 Thread Gabriel Genellina
En Thu, 25 Mar 2010 05:31:05 -0300, News123 escribió: I'm havign a small xmlrpc client, which works normally fine. (xmlrpc via https) Sometimes however I receive an Exception about an expat error. The output, that I receive is: File "C:\mycode\myrpcclient.py", line 63, in upload_chunk

Re: GIF89A and PIL

2010-03-29 Thread Cameron Simpson
On 27Mar2010 19:44, Stephen Hansen wrote: | Yeah, I don't expect much from PNG. The images are very small but I | might be sending a LOT of them over a pipe which is fairly tight, so | 50-60 bytes matters. That's why I selected GIF. How well does a stream of XPM files compress? Probably not enoug

"jobs in saudi arabia universities" "jobs in saudi arabia for pakistanis" "jobs in saudi" "saudi jobs" "saudi job vacancies" "saudi job visa" "saudi job consultants" "saudi jobs site" "jobs site" on

2010-03-29 Thread Naeem
"jobs in saudi arabia universities" "jobs in saudi arabia for pakistanis" "jobs in saudi" "saudi jobs" "saudi job vacancies" "saudi job visa" "saudi job consultants" "saudi jobs site" "jobs site" on http://jobsinsaudiarabia-net.blogspot.com/ "jobs in saudi arabia universities" "jobs in saudi a

PyScripter Logo

2010-03-29 Thread Vincent MAILLE
Hi, Where can I find a image of the snake PyScipter in high quality ? Thnaks, Vincent -- http://mail.python.org/mailman/listinfo/python-list

Re: sum for sequences?

2010-03-29 Thread Steven D'Aprano
On Mon, 29 Mar 2010 19:53:04 -0700, Steve Howell wrote: > On Mar 29, 4:19 pm, Steven D'Aprano cybersource.com.au> wrote: [...] >> Python is under no compulsion to make "the obvious way" obvious to >> anyone except Guido. It's a bonus if it happens to be obvious to >> newbies, not a requirement. >