From: Robie B. <rb-...@ju...> - 2008-06-17 16:50:08
|
Hi, I'm using Xmp.py as a template to start from. In functions defined inside the XmpFile class, I need to access some state I have stored in the Xmp class instance (at a minimum some mount options). Is there any way to get to this? In particular, I need to access it from the __init__ function, because that's the open call, but of course at that point the XmpFile class instance couldn't have any attributes set as it as only just come into existence. The only way that I can see to get around this is to replace Xmp.file_class to a special XmpFile factory on a per-instance-of-Xmp basis, but this is pretty horrific. Is there any other way that I'm supposed to do this? Thanks, Robie |