[Zope] StructuredText & LocalFS in Python Script
Elena Schulz
elena.schulz@gmx.net
Fri, 2 Aug 2002 09:49:21 +0200
Dear List,
having the following objects:
sourceFolder points to a LocalFS-Instance,
fileId points to a file in the LocalFS-Instance,
and convert_nonascii_1(string) is just a method to exchange some text in
string.
in DTML I can do the following:
<dtml-var "convert_nonascii_1(_.str(_.getitem(sourceFolder, 1)[fileId]))"
fmt=structured-text>
But how is it done in Python Script?
if myLFSname is the name of the LocalFS-Instance and file.txt the name of a
file in the LocalFS-Instance this works fine:
context.myLFSname['file.txt']()
But as soon as I try to do it with sourceFolder and fileId, I get only
errors even if the Script can resolve both.
Does anybody know why? And how do I use structured Text in Python Script as
in DTML:
<dtml-var my Var fmt=structured-text>
Thanks a lot for your help,
Elena