I got a Python function that outputs a list like this,
def get_items(argument):
for item in items:
print item
On the terminal, when I pass an argument to my function and print, like, “get_items(test)” I get:
item1
item2
item3
Now, I need to get this on post through storage field (I already got this part working, but I can only print variables with static content, while the content of a list inside a function will return “None”). What I need looks like this,
item1
item2
item3
In view source, it will look like this,
<p>
item1<br/>
item2<br/>
item3<br/>
</p>
I’m stomped on how to print this, which in php would be such a simple approach as embedding php within the html content. However, Python throws a 500 error anytime I try anything….
Please, help!
If you are executing your script as a CGI- your script MUST echo out a Content-type followed by 2 returns before anything else: