error using tags within functions
"Dustin ?" <[email protected]>
| Newsgroups | gmane.comp.python.spyce.general |
|---|---|
| Message-ID | <[email protected]> |
Hello,
I'm trying to write my first Spyce project and I'm having an issue when
trying to use active tags within a defined function. Perhaps I'm not doing
this correctly, but the error I get is:
Traceback (most recent call last):
File "/usr/share/spyce/spyce.py", line 554, in __init__
try: exec self.getCode() in self._codeenv
SyntaxError: unqualified exec is not allowed in function 'spyceProcess' it
contains a nested function with free variables (<string>, line 39)
Here's what my code looks like (well, it actually looks a lot different, but
this will create the error):
[[.taglib from=tags.spi as=form]]
[[-- PAGE 1 --]]
[[
def page1(): {
]]
<html>
<form:lettersonly>test</form:lettersonly>
</html>
[[
}
page1()
]]
If I don't put the tag within the function, it works fine. What am I doing
wrong? Is this sort of thing not allowed?
Thank you for any help,
Dustin
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642