[Zope-dev] getitem in python script
Eddie Moench
Moench@Ontoprise.DE
Tue, 14 May 2002 17:18:43 +0200
This is a multi-part message in MIME format.
------=_NextPart_000_000D_01C1FB6B.79C87FA0
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit
is there a possibility to use the getitem method in python scripts?
My concrete problem is as follows:
I have a parameter - say folder - as input and just want to jump into
that folder:
the script:
return container.getitem('folder').id
does not work! Has anyone a solution?
Thanks, Eddie.
------=_NextPart_000_000D_01C1FB6B.79C87FA0
Content-Type: text/html;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
<html xmlns:v=3D"urn:schemas-microsoft-com:vml" =
xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns=3D"http://www.w3.org/TR/REC-html40">
<head>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">
<meta name=3DProgId content=3DWord.Document>
<meta name=3DGenerator content=3D"Microsoft Word 10">
<meta name=3DOriginator content=3D"Microsoft Word 10">
<link rel=3DFile-List href=3D"cid:filelist.xml@01C1FB6B.656317F0">
<!--[if gte mso 9]><xml>
<o:OfficeDocumentSettings>
<o:DoNotRelyOnCSS/>
</o:OfficeDocumentSettings>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:WordDocument>
<w:SpellingState>Clean</w:SpellingState>
<w:GrammarState>Clean</w:GrammarState>
<w:DocumentKind>DocumentEmail</w:DocumentKind>
<w:HyphenationZone>21</w:HyphenationZone>
<w:EnvelopeVis/>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
</w:Compatibility>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
</w:WordDocument>
</xml><![endif]-->
<style>
<!--
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-parent:"";
margin:0cm;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;
text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline;
text-underline:single;}
p
{mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";}
span.EmailFormatvorlage17
{mso-style-type:personal-compose;
mso-style-noshow:yes;
mso-ansi-font-size:10.0pt;
mso-bidi-font-size:10.0pt;
font-family:Arial;
mso-ascii-font-family:Arial;
mso-hansi-font-family:Arial;
mso-bidi-font-family:Arial;
color:windowtext;}
span.SpellE
{mso-style-name:"";
mso-spl-e:yes;}
span.GramE
{mso-style-name:"";
mso-gram-e:yes;}
@page Section1
{size:595.3pt 841.9pt;
margin:70.85pt 70.85pt 2.0cm 70.85pt;
mso-header-margin:35.4pt;
mso-footer-margin:35.4pt;
mso-paper-source:0;}
div.Section1
{page:Section1;}
-->
</style>
<!--[if gte mso 10]>
<style>
/* Style Definitions */=20
table.MsoNormalTable
{mso-style-name:"Normale Tabelle";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-parent:"";
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin:0cm;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman";}
</style>
<![endif]--><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=3DDE link=3Dblue vlink=3Dpurple =
style=3D'tab-interval:35.4pt'>
<div class=3DSection1>
<p class=3DMsoNormal><span class=3DGramE><font size=3D3 face=3D"Times =
New Roman"><span
lang=3DEN-GB =
style=3D'font-size:12.0pt;mso-ansi-language:EN-GB'>is</span></font></span=
><span
lang=3DEN-GB style=3D'mso-ansi-language:EN-GB'> there a possibility to =
use the <span
class=3DSpellE>getitem</span> method in python =
scripts?<o:p></o:p></span></p>
<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
lang=3DEN-GB
style=3D'font-size:12.0pt;mso-ansi-language:EN-GB'><o:p> </o:p></spa=
n></font></p>
<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
lang=3DEN-GB
style=3D'font-size:12.0pt;mso-ansi-language:EN-GB'>My concrete problem =
is as
follows:<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
lang=3DEN-GB
style=3D'font-size:12.0pt;mso-ansi-language:EN-GB'>I have a parameter =
– say
folder – as input and just want to jump into that =
folder:<o:p></o:p></span></font></p>
<p class=3DMsoNormal><span class=3DGramE><font size=3D3 face=3D"Times =
New Roman"><span
lang=3DEN-GB =
style=3D'font-size:12.0pt;mso-ansi-language:EN-GB'>the</span></font></spa=
n><span
lang=3DEN-GB style=3D'mso-ansi-language:EN-GB'> =
script:<o:p></o:p></span></p>
<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
lang=3DEN-GB
style=3D'font-size:12.0pt;mso-ansi-language:EN-GB'><o:p> </o:p></spa=
n></font></p>
<p class=3DMsoNormal><span class=3DGramE><font size=3D3 face=3D"Times =
New Roman"><span
lang=3DEN-GB =
style=3D'font-size:12.0pt;mso-ansi-language:EN-GB'>return</span></font></=
span><span
lang=3DEN-GB style=3D'mso-ansi-language:EN-GB'> <span =
class=3DSpellE>container.getitem</span>(‘folder’).id<o:p></o:=
p></span></p>
<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
lang=3DEN-GB
style=3D'font-size:12.0pt;mso-ansi-language:EN-GB'><o:p> </o:p></spa=
n></font></p>
<p class=3DMsoNormal><span class=3DGramE><font size=3D3 face=3D"Times =
New Roman"><span
lang=3DEN-GB =
style=3D'font-size:12.0pt;mso-ansi-language:EN-GB'>does</span></font></sp=
an><span
lang=3DEN-GB style=3D'mso-ansi-language:EN-GB'> not work! Has anyone a =
solution?<o:p></o:p></span></p>
<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
lang=3DEN-GB
style=3D'font-size:12.0pt;mso-ansi-language:EN-GB'><o:p> </o:p></spa=
n></font></p>
<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
lang=3DEN-GB
style=3D'font-size:12.0pt;mso-ansi-language:EN-GB'>Thanks, =
Eddie.<o:p></o:p></span></font></p>
</div>
</body>
</html>
------=_NextPart_000_000D_01C1FB6B.79C87FA0--