PIL Error: "cannot read interlaced PNG files"

2007-09-10 Thread T-u-N-i-X
Hey There,

I'm developing an application that lets the user to upload JPG and PNG
files. I'm using PIL to check the images after the upload (like
checking it storage size, width and height). But PIL raises an error:

"cannot read interlaced PNG files"

It says that interlaced PNG files are not supported in the PIL
documentation. I'm using PIL 1.1.6-2 on Arch Linux..

I can check all images with:

from PIL import Image
im = Image.open('image.png')
im.info

which returns a dictionary about the image. If the dict has
'interlace' key with the value 1, then I reject the event that's being
send with a validation error. But I don't think this is a good idea
since this could be very annoying for the users.

-- 
http://mail.python.org/mailman/listinfo/python-list


Serious Problem with Timezone

2008-05-19 Thread T-u-N-i-X
Hey There,

I'm a django developer and working on a project right now.. Last week
I just discovered a new problem in Python.. Here's what I do..

[01:00] ([EMAIL PROTECTED] ~)$ date
Sal May 20 01:00:10 EEST 2008
[01:00] ([EMAIL PROTECTED] ~)$ python
Python 2.5.2 (r252:60911, Feb 23 2008, 21:20:32)
[GCC 4.2.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from datetime import datetime
>>> datetime.now()
datetime.datetime(2008, 5, 20, 1, 0, 21, 131804)
>>> import os
>>> os.environ["TZ"] = "Europe/Istanbul"
>>> datetime.now()
datetime.datetime(2008, 5, 19, 22, 0, 38, 578438)
>>>

It's 01:00 in Istanbul now and Python shows 22:00 on 19th of May if I
set the TZ environment variable.. Django sets that variable
automatically so I'm having problems with scheduled posts..

I controlled my system's BIOS time.. It was wrong before, so I just
corrected it.. I set the time to UTC on Linux.. What else can I do ?
--
http://mail.python.org/mailman/listinfo/python-list