Ashley Lloyd wrote:
Longer term, you'll want to read up on debugging in Python.
Agreed!
For now, let's just kludge something together.
Thank you, yet again
I put your code into the External Method, and called it just before the loop. If I return lines_check(lines), then it just sends back:
lines is type: lines has value:
Look at the source of the page where you see that, if your browser tries to interpret the return value as html, this will hide things like <type 'bla'>. Oh, and like Chris, I'm quite sure that "lines" is not what you think it is. If you want to prove or disprove dylan's theory about an imported module poluting the namespace - which I doubt, for one because you said it worked if you manually assign lines in the external method - just rename it to i.e. my_lines, IOW: my_lines = REQUEST.lines and so on. Another thing, I think you are calling your External Method now like. <dtml-call "REQUEST.set(.., lines=mylines). ... hmm, wait Is mylines the name of the python script you mentioned? That would explain everything. Try REQUEST.set(.., lines=mylines()). HTH, oliver