Compiler fails when template starts with blank line
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
web.py |
New
|
Undecided
|
Unassigned |
Bug Description
When the template file in http://
This might be related to bug #372540 (resolved in 0.33).
% python web/template.py --compile templates
Traceback (most recent call last):
File "web/template.py", line 1414, in <module>
compile_
File "web/template.py", line 1074, in compile_templates
t = Template(
File "web/template.py", line 834, in __init__
code = self.compile_
File "web/template.py", line 892, in compile_template
compiled_code = compile(code, filename, 'exec')
File "templates/
def with (notes)
^
SyntaxError: invalid syntax
Template traceback:
File 'templates/
<h1>Hello, world!</h1>
summary: |
- Blank lines at top of file breaks template compiler + Blank line at top of file breaks template compiler |
summary: |
- Blank line at top of file breaks template compiler + Compiler fails when template starts with blank line |
This is in the documentation, http:// webpy.org/ tutorial3. en#templating
"Currently, template.py requires the $def statement to be the first line of the file."