Help! IIS and Python

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

sjoshi at (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.

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
   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

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

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

More information about the Python-list mailing list