Newbie question here: How does one go about discovering the attributes and attribute names of an unknown object? At the moment I'm building a MySQL database with a Zope front end. My client will be storing Microsoft Word documents in the system (it's a management tool for academic reviews of submissions to a journal). I have a blob field in the manuscript database, and I can add in fields for MIME type and such if needed; but all the information I have on the file once it's uploaded is <ZPublisher.HTTPRequest.FileUpload instance at 0x3d3188cc> Now, this would be all fine and well if I knew what the properties and methods supported by the FileUpload object were, but I don't and I can't find documentation of that; I also tried iterating through the object to see if I could coax the information out that way: <table border> <tr tal:repeat="theFile container/REQUEST/Manuscript_File> <td tal:content="repeat/theFile/name">property name</td> <td tal:content="repeat/theFile/item">property data</td> </tr> </table> but it says the object does not support iteration. So: I guess I have two questions: (1) how can one determine the data and properties of an uploaded file? (2) how can one determine the properties of an arbitrary object? TIA! Murray
Murray Pearson wrote at 2004-2-17 16:02 -0700:
How does one go about discovering the attributes and attribute names of an unknown object?
There is my "DocFinder" product <http://www.dieter.handshake.de/pyprojects/zope>
... but all the information I have on the file once it's uploaded is
<ZPublisher.HTTPRequest.FileUpload instance at 0x3d3188cc>
Look at the source. It is (surprise) in ".../ZPublisher/HTTPRequest.py". -- Dieter
participants (2)
-
Dieter Maurer -
Murray Pearson