<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Also, i don't think that ZSQL methods return a simple string, so the
comparison is between wrong types of objects....<br>
<br>
Pascal Peregrina wrote:
<blockquote cite="midB04D245FBAA92241833B01C21BEC259E09E31724@LMNFREX01"
type="cite">
<pre wrap="">Also, I think that :
"else"
should be :
"else:"
Pascal
-----Message d'origine-----
De : <a class="moz-txt-link-abbreviated" href="mailto:zope-bounces@zope.org">zope-bounces@zope.org</a> [<a class="moz-txt-link-freetext" href="mailto:zope-bounces@zope.org">mailto:zope-bounces@zope.org</a>]De la part de
Vangelis Mihalopoulos
Envoyé : mardi 29 mars 2005 14:03
À : prabuddha ray
Cc : <a class="moz-txt-link-abbreviated" href="mailto:zpugdc@zope.org">zpugdc@zope.org</a>; <a class="moz-txt-link-abbreviated" href="mailto:zope@zope.org">zope@zope.org</a>
Objet : Re: [Zope] python prob
Indentation maybe?
the if-else part should be on the outer indent like......
req = container.REQUEST
RESP = request.RESPONSE
user=req.username
pwd=req.password
# chkpwd is a ZSQL method taking username as arg and giving its
correspong passwd
if container.chkpwd(user)==pwd : # it givs syntax error here
        RESP.redirect(test)
else
        RESP.redirect(index_html)
prabuddha ray wrote:
</pre>
<blockquote type="cite">
<pre wrap="">i'm kinda new to python ;
wanted to build an intermediate scrip python for redirection from a ZPT .
code tried is
req = container.REQUEST
RESP = request.RESPONSE
user=req.username
pwd=req.password
# chkpwd is a ZSQL method taking username as arg and giving its
correspong passwd
        if container.chkpwd(user)==pwd : # it givs syntax
</pre>
</blockquote>
<pre wrap=""><!---->error here
</pre>
<blockquote type="cite">
<pre wrap="">                RESP.redirect(test)
        else
                RESP.redirect(index_html)
plz help
</pre>
</blockquote>
<pre wrap=""><!---->_______________________________________________
Zope maillist - <a class="moz-txt-link-abbreviated" href="mailto:Zope@zope.org">Zope@zope.org</a>
<a class="moz-txt-link-freetext" href="http://mail.zope.org/mailman/listinfo/zope">http://mail.zope.org/mailman/listinfo/zope</a>
** No cross posts or HTML encoding! **
(Related lists -
<a class="moz-txt-link-freetext" href="http://mail.zope.org/mailman/listinfo/zope-announce">http://mail.zope.org/mailman/listinfo/zope-announce</a>
<a class="moz-txt-link-freetext" href="http://mail.zope.org/mailman/listinfo/zope-dev">http://mail.zope.org/mailman/listinfo/zope-dev</a> )
**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.
<a class="moz-txt-link-abbreviated" href="http://www.mimesweeper.com">www.mimesweeper.com</a>
**********************************************************************
_______________________________________________
Zope maillist - <a class="moz-txt-link-abbreviated" href="mailto:Zope@zope.org">Zope@zope.org</a>
<a class="moz-txt-link-freetext" href="http://mail.zope.org/mailman/listinfo/zope">http://mail.zope.org/mailman/listinfo/zope</a>
** No cross posts or HTML encoding! **
(Related lists -
<a class="moz-txt-link-freetext" href="http://mail.zope.org/mailman/listinfo/zope-announce">http://mail.zope.org/mailman/listinfo/zope-announce</a>
<a class="moz-txt-link-freetext" href="http://mail.zope.org/mailman/listinfo/zope-dev">http://mail.zope.org/mailman/listinfo/zope-dev</a> )
</pre>
</blockquote>
</body>
</html>