image scaling in cairo, python

2008-05-24 Thread _wolf
[also posted to: [EMAIL PROTECTED] hi all, i've heard cairo has become the image scling library for firefox3. is that true? wonderful, i want to do that in python. there's a python interface for cairo, right? i've used it before to do simple vector stuff. seems to work. however, i haven't been ab

Re: scaling problems

2008-05-20 Thread David Stanek
s and processes. > > I am not planning to write a web server framework, but to use one. > Doubtless a python framework could be written to have satisfactory > scaling properties, but what are the scaling properties of the ones > that have been written? > Both Django and TurborGears w

Re: scaling problems

2008-05-20 Thread Duncan Booth
Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > On Tue, 20 May 2008 10:47:50 +1000, James A. Donald wrote: > >> 2. It is not clear to me how a python web application scales. > > Ask YouTube. :-) Or look at Google appengine where unlike normal Python you really are prevented from making

Re: scaling problems

2008-05-20 Thread Nick Craig-Wood
Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > On Tue, 20 May 2008 13:57:26 +1000, James A. Donald wrote: > > > The larger the program, the greater the likelihood of inadvertent name > > collisions creating rare and irreproducible interactions between > > different and supposedly independe

Re: scaling problems

2008-05-20 Thread Graham Dumpleton
is: > > > Are there python web frameworks that scale with hardware and how do > > > they handle scaling? > > Reid Priedhorsky > > > This sounds like a good match for Apache withmod_python. > > I would hope that it is, but the question that I would like to know

Re: scaling problems

2008-05-20 Thread Marc 'BlackJack' Rintsch
On Tue, 20 May 2008 10:47:50 +1000, James A. Donald wrote: > 2. It is not clear to me how a python web application scales. Ask YouTube. :-) Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

Re: scaling problems

2008-05-20 Thread Marc 'BlackJack' Rintsch
On Tue, 20 May 2008 13:57:26 +1000, James A. Donald wrote: > The larger the program, the greater the likelihood of inadvertent name > collisions creating rare and irreproducible interactions between > different and supposedly independent parts of the program that each > work fine on their own, and

Re: scaling problems

2008-05-19 Thread Arnaud Delobelle
James A. Donald <[EMAIL PROTECTED]> writes: > Ben Finney > The larger the program, the greater the likelihood of inadvertent name > collisions creating rare and irreproducible interactions between > different and supposedly independent parts of the program that each > work fine on their own, and

Re: scaling problems

2008-05-19 Thread James A. Donald
sses to handle > requests. And from what I hear is scales just fine. > > I think you are looking at the problem wrong. The fundamentals are the > same between threads and processes. I am not planning to write a web server framework, but to use one. Doubtless a python framework could be

Re: scaling problems

2008-05-19 Thread James A. Donald
a lot of http requests > > for one url, a small number of python processes will each sequentially > > handle a large number of those requests. What I am really asking is: > > Are there python web frameworks that scale with hardware and how do > > they handle scaling? Reid Pri

Re: scaling problems

2008-05-19 Thread James A. Donald
> > 1. Looks to me that python will not scale to very large programs, > > partly because of the lack of static typing, but mostly because there > > is no distinction between creating a new variable and utilizing an > > existing variable, Ben Finney > This seems quite a non sequitur. How do you s

Re: scaling problems

2008-05-19 Thread Carl Banks
On May 19, 8:47 pm, James A. Donald <[EMAIL PROTECTED]> wrote: > 1. Looks to me that python will not scale to very large programs, > partly because of the lack of static typing, but mostly because there > is no distinction between creating a new variable and utilizing an > existing variable, so th

Re: scaling problems

2008-05-19 Thread Ben Finney
James A. Donald <[EMAIL PROTECTED]> writes: > I am just getting into python, and know little about it Welcome to Python, and this forum. > and am posting to ask on what beaches the salt water crocodiles hang > out. Heh. You want to avoid them, or hang out with them? :-) > 1. Looks to me that

Re: scaling problems

2008-05-19 Thread David Stanek
anize it as one > python program for each url, but if one gets a lot of http requests > for one url, a small number of python processes will each sequentially > handle a large number of those requests. What I am really asking is: > Are there python web frameworks that scale with hardware

Re: scaling problems

2008-05-19 Thread Reid Priedhorsky
ocesses. Or one could organize it as one > python program for each url, but if one gets a lot of http requests > for one url, a small number of python processes will each sequentially > handle a large number of those requests. What I am really asking is: > Are there python web framew

scaling problems

2008-05-19 Thread James A. Donald
will each sequentially handle a large number of those requests. What I am really asking is: Are there python web frameworks that scale with hardware and how do they handle scaling? Please don't read this as "Python sucks, everyone should program in machine language expressed as binary nu

Re: the scaling of pics in pygame

2008-04-02 Thread alex23
On Apr 2, 12:44 pm, Jimmy <[EMAIL PROTECTED]> wrote: > I am using Pygame to write a small program. I tried to load a .jpg > picture into > the screen, however, the size of the pic doesn't fit into the window > properly. Can > anyone tell me how to scale the picture into the window? Have you tried

Re: the scaling of pics in pygame

2008-04-02 Thread Ramsey Nasser
Isn't PIL best suited for things like this? The resize function should do what you're looking for: http://www.pythonware.com/library/pil/handbook/image.htm On Wed, Apr 2, 2008 at 6:59 AM, <[EMAIL PROTECTED]> wrote: > On Apr 1, 9:44 pm, Jimmy <[EMAIL PROTECTED]> wrote: > > Hi, everyone > > > >

Re: the scaling of pics in pygame

2008-04-01 Thread lbonafide
On Apr 1, 9:44 pm, Jimmy <[EMAIL PROTECTED]> wrote: > Hi, everyone > > I am using Pygame to write a small program. I tried to load a .jpg > picture into > the screen, however, the size of the pic doesn't fit into the window > properly. Can > anyone tell me how to scale the picture into the window?

the scaling of pics in pygame

2008-04-01 Thread Jimmy
Hi, everyone I am using Pygame to write a small program. I tried to load a .jpg picture into the screen, however, the size of the pic doesn't fit into the window properly. Can anyone tell me how to scale the picture into the window? thanks! -- http://mail.python.org/mailman/listinfo/python-list

Re: scaling

2007-05-01 Thread Charles Sanders
Gabriel Genellina wrote: [snip] > if x elif x>maxvalue: yield top > else: yield (x-minvalue)*top/(maxvalue-minvalue) [snip] Personally, I find yield min(top,max(0,(x-minvalue)*top/(maxvalue-minvalue))) or scaled_value = (x-minvalue)*top/(maxvalue-minvalue) yiel

Re: scaling

2007-05-01 Thread Gabriel Genellina
En Tue, 01 May 2007 11:22:28 -0300, Ashok <[EMAIL PROTECTED]> escribió: > IDL language contains a function called BYTSCL to scale all values of > Array that lie in the range (Min £ x £ Max) into the range (0 £ x £ > Top). Is there a similar function available in python? > > I need this to scale th

scaling

2007-05-01 Thread Ashok
hi, IDL language contains a function called BYTSCL to scale all values of Array that lie in the range (Min £ x £ Max) into the range (0 £ x £ Top). Is there a similar function available in python? I need this to scale the pixel values of an image using PIL. thanks in advance for any help AGK

Re: Scaling pictures

2006-12-30 Thread cyberco
cyberco wrote: > PIL is certainly a fine option, but I noticed that the scaled images > (scaled with the ANTIALIAS filter) are not as good as you can get with, > say, Photoshop. Maybe I'm just expecting too much, but I wish I could > choose a higher quality rescaling algorithm. PIL still rocks thou

Re: Scaling pictures

2006-12-29 Thread cyberco
e processing in python before so I would like to ask what > > is the best way of doing this, I will not do anything else than scaling the > > images. > > > I found the Python Imaging Library but before I dive into that I would like > > to know if there is a better way of doin

Re: Scaling pictures

2006-12-29 Thread Kajsa Anka
On Thu, 28 Dec 2006 11:53:41 +0100, Kajsa Anka wrote (in article <[EMAIL PROTECTED]>): Thanks for the answers, I'll use PIL. jem -- http://mail.python.org/mailman/listinfo/python-list

Re: Scaling pictures

2006-12-28 Thread bearophileHUGS
Kajsa Anka: > I found the Python Imaging Library but before I dive into that I would like > to know if there is a better way of doing this. PIL is very fit for that. Note that it creates thumbnails already by itself, you can use that for bigger images too. Bye, bearophile -- http://mail.python.

Re: Scaling pictures

2006-12-28 Thread Ravi Teja
doing this, I will not do anything else than scaling the > images. > > I found the Python Imaging Library but before I dive into that I would like > to know if there is a better way of doing this. Yes. Python Imaging Library (PIL) is the preferred Python way to do this. The example i

Re: Scaling pictures

2006-12-28 Thread buffi
ng this, I will not do anything else than scaling the > images. > > I found the Python Imaging Library but before I dive into that I would like > to know if there is a better way of doing this. I prefer using imagemagick whenever I have to do anything related to images. http://ww

Scaling pictures

2006-12-28 Thread Kajsa Anka
else than scaling the images. I found the Python Imaging Library but before I dive into that I would like to know if there is a better way of doing this. -- http://mail.python.org/mailman/listinfo/python-list

Re: Scaling down (was Re: Dealing with marketing types...)

2005-06-12 Thread Aahz
rite chunks, whichever costs less FOR THE BUSINESS. >> and LAMP does have many mechanisms to obtain scalability when it's >> needed. > >LAMP seems to have no solution other than scaling (i.e. blowing more >money on hardware and colo space). One really gets the impres

Re: Scaling down (was Re: Dealing with marketing types...)

2005-06-12 Thread Paul Rubin
a day when your first prototype can no longer handle the traffic. The question then is how do you deal with that. > and LAMP does have many mechanisms to obtain scalability when it's > needed. LAMP seems to have no solution other than scaling (i.e. blowing more money on hardware and

Scaling down (was Re: Dealing with marketing types...)

2005-06-12 Thread Aahz
In article <[EMAIL PROTECTED]>, Paul Rubin wrote: > >What example? Slashdot? It uses way more hardware than it needs to, >at least ten servers and I think a lot more. If LJ is using 6x as >many servers and taking 20x (?) as much traffic as Slashdot, then LJ >is doing