[Zope] Querying Unknown Properties
Murray Pearson
zope at ahadesign.ca
Tue Feb 17 18:02:12 EST 2004
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 1378 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zope/attachments/20040217/0a445418/attachment.bin
More information about the Zope
mailing list