3.2 A Python Script

Aspen supports pseudo-CGI-style programming with more or less regular python scripts. In your aspentut directory, create a file named foo.py with the following contents:

start_response('200 OK', [('Content-Type', 'text/plain')])
response = ["Greetings, program!"]

Assuming that Aspen is still running, hit http://localhost:8080/foo.py in your browser. You should again see "Greetings, program!"

aspen is Zeta software. It is copyright © 2006 by Chad Whitacre, and is offered free of charge, warranty, and restrictions.