I've an apache server that i'm using for cgi. I'm writing my cgis in Python.

As lengthy as my reactions are from the form "Content-Type: text/htmln #" it really works.

But when I send other things, I recieve a 500 error and my logs say "malformed header from script. Bad header" Can One change my designs to really make it work? Can there be other things I'm able to do?

As with every CGI, you'll need a blank line between your headers and the entire body.

print 'Content-Type: text/plain'
print 'Hello, World!'

You have to send a Content-Type header to inform the browser which kind of data you are delivering it. Without that you will obtain the 500 error you are going through.