Right on both counts, Bruno. Thanks. I thought I was running the same
Python version in both environments, but I was not. I am running Python
2.7.3 in my linux environment (which works without error) and Python 2.5.5
on Windows (where I was receiving the error).
Your workaround was effective, but I think I'll just run my windows code on
Python 2.7 to take advantage of the cleaner syntax.
Thanks much,
Mike
On Sunday, September 23, 2012 11:14:55 AM UTC-4, rochacbruno wrote:
>
> Check the Python version, Ive seem this error on 2.5 and early versions of
> 2.6.
>
> workaround is.
>
> HELPER(*items, **{"_class": "value"})
>
> Bruno Rocha
> http://rochacbruno.com.br
> mobile
> Em 23/09/2012 11:45, "Michael Wolfe" <[email protected]<javascript:>>
> escreveu:
>
>> I'm receiving an invalid syntax error when running from Windows. I do not
>> receive the error when running the same code from my Webfaction account on
>> CentOS. The error appears to be related to compiling of the code. I assume
>> the compile code is taking issue with the HTML helper functions which allow
>> _myattribute="Value" to be translated into the HTML myattribute="Value". Am
>> I just missing something simple? This has been driving me crazy.
>>
>> Thanks,
>> Mike
>>
>> Traceback (most recent call last):
>>
>>
>> File "M:\My Documents\EstateCommander\web2py\gluon\restricted.py", line
>> 208, in restricted
>>
>>
>> ccode = compile2(code,layer)
>> File "M:\My Documents\EstateCommander\web2py\gluon\restricted.py", line
>> 193, in compile2
>>
>>
>> return compile(code.rstrip().replace('\r\n','\n')+'\n', layer, 'exec')
>>
>>
>> File "C:/Users/Mike/Documents/My
>> Dropbox/EstateCommander/web2py/applications/estate/controllers/forms.py"
>> <http://127.0.0.1:8000/admin/default/edit/estate/controllers/forms.py>, line
>> 15
>>
>>
>> table = TABLE(*rows, _border="0", _align="center", _width="50%")
>>
>>
>> ^
>> SyntaxError: invalid syntax
>>
>> --
>>
>>
>>
>>
>
--