Doesn't fix it. I changed the function to be this instead:

    def Photo_Test(self):
        from PIL import Image
        from StringIO import StringIO
        lock.acquire()
        f=open("test.jpg","rb")
        data=f.read(1000000)
        response.headers["content-type"]="image/jpeg"
        response.write(data)
        lock.release()

with the lock being defined at the top of the file.

I wouldn't expect it to fix it since it's just one user (me)
connecting and trying to get the image.... shouldn't be multithreaded.

Thanks.

On Oct 19, 3:01 am, zunzun <[EMAIL PROTECTED]> wrote:
> Try threadlocking PIL as I do here;
>
> http://wiki.pylonshq.com/display/pylonscommunity/Adding+graphical+output
>
>      James
>
> On Oct 18, 2:26 am, Razor19110 <[EMAIL PROTECTED]> wrote:
>
>
>
> > The test.jpg file is just a tiny test jpeg. When I run "paster serve --
> > reload development.ini" and go to the page that would execute this
> > function paster just quits, and the browser is left with an empty
> > page.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to pylons-discuss@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to