Help! IIS and Python

Tim Roberts timr at probo.com
Thu Feb 14 07:23:41 CET 2002


sjoshi at ingr.com (Sunit Joshi) wrote:
>
>I'm trying to use IIS5.0 with Python 2.1 and whenever I try to import
>modules I get an error. The test.asp and error are below.
>thanks

It wouldn't have solved your problem, but it might help you to know that
you do not need to import the string module any more.  All of the functions
in the string module are now methods of string objects.  That is, instead
of:
   x = string.upper( "xyz" )
you can say:
   x = "xyz".upper()

And, in fact, the code in the string module now does just that:

   def upper(s)
     return s.upper()

Since we're on the subject of Python in ASP programming, how do you use the
<%=xxx%> trick with indentation?  This fails with an indentation error, for
example:

<%
for i in range(5):
%>
  <%="aaa%d" % i %>

--
- Tim Roberts, timr at probo.com
  Providenza & Boekelheide, Inc.



More information about the Python-list mailing list