From: Jay L. <js...@js...> - 2000-06-18 15:52:32
|
Hi Dave. You've got your "else:" indented. It shouldn't be. Inside the script brackets, you're writing straight python. So, this works fine (fo me) and does what you want, I think. (BTW, why did you have that "1" after your "else:" ?) <%@ page method="writeHTML" %> PSP Test <% q=1 %> <% if q: self.writeln("We have Q") else: %> Sorry! No Q !!! <% end %> Dave wrote: > > In PSP I have a case where I would like to calculate the output in the > first part of an if statement and use static html for the else clause, > unfortunately the parser doen't seem to like this. I have attached an > example of what I am trying to do. > > Dave. > > --------------------------------------------------------------- > <%@ page method="writeHTML" %> > > PSP Test > > <% q=1 %> <% if q: self.writeln("We have Q") else: 1%> Sorry! No Q !!! > <% end %> |