[Zope] Class with a File as a Attribute/Property

Damon Eckhoff eckhoffd@missouri.edu
Mon, 03 Jun 2002 14:47:23 -0500


Hello:

This is my first attempt at creating a Zope product so I'm trying to figure
out a thousand things at once...

I would like to create a product class that has a File object as a class
attribute.

Something to the effect:

Class foo:

    _file = None
    _anotherFile = None

    setFile( self, file ):
    "Sets the file"
    _file = file

    getFile( self ):
    "Returns the file as a File object"
    return _file

    setAnotherFile( self, file ):
    "Sets the file"
    self._anotherFile = file

    getAnotherFile( self ):
    "Returns the file as a File object"
    return self._anotherFile

I'm not sure where to start.  I've looked through Image.py to get some
insight.  I don't want to create my own File class, and I don't want to
subclass an existing File class either.  Am I basically on the right track?
I haven't found any good reading on this topic... So I'm scouring source
code (that I don't really understand yet).

I appreciate any help and any ropes...

Flailing,

Damon.