Am 13.04.2011, 13:27 Uhr, schrieb Joe Borġ <j...@sitrep3.com>:

Hi,
Just wondering if there is a way to destruct after use, for example:
img = Image.open("/dir/to/file.png")
img.info
img.close
So that I have to start from open in order to carry on using.

You can always just delete the object in Python:

del img

I don't think that explicitly invokes a destructor but it does stop you doing *anything* with the image subsequently.

Charlie
--
Charlie Clark
Managing Director
Clark Consulting & Research
German Office
Helmholtzstr. 20
Düsseldorf
D- 40215
Tel: +49-211-600-3657
Mobile: +49-178-782-6226
_______________________________________________
Image-SIG maillist  -  Image-SIG@python.org
http://mail.python.org/mailman/listinfo/image-sig

Reply via email to