Thanks: this did it. Dan
On Apr 4, 10:45 pm, Anand Chitipothu <[email protected]> wrote: > 2010/4/3 Dan Steingart <[email protected]>: > > > > > > > So I'm using web.py with CGI, and when I navigate to the app, rather > > than displaying the web on a page, my browser downloads a text file. > > For example, rather than seeing "hello world" on the web I get a text > > file that says "hello world". > > > Here's the code. Thanks! > > > #!/usr/bin/python > > > import web > > > urls = ( > > '/', 'index' > > ) > > > app = web.application(urls, globals()) > > > class index: > > def GET(self): > > a = "Hello World!" > > return a > > > if __name__ == "__main__": app.run() > > Try adding > web.header("Content-Type", "text/plain") > before return. -- You received this message because you are subscribed to the Google Groups "web.py" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/webpy?hl=en.
