Python CGI returning an http status code, such as 403?

Viewed 12200

How can my python cgi return a specific http status code, such as 403 or 418?

I tried the obvious (print "Status:403 Forbidden") but it doesn't work.

2 Answers
Related