Re: Image module destructor

"Charlie Clark" <[email protected]>
Newsgroups gmane.comp.python.image
Organization Clark Consulting & Research
Message-ID <[email protected]>
Am 13.04.2011, 13:27 Uhr, schrieb Joe Borġ <[email protected]>:

> 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  -  [email protected]
http://mail.python.org/mailman/listinfo/image-sig
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.