0
@d path @{/path/to/the/directory/@}
@o code @{
filename = '@<path@>the_file'
@}

Running python3 -m pyweb test.w -wHTML results in the following code file:

filename = '            /path/to/the/directory/the_file'

The 12 space characters inside the string at the beginning appear because pyweb considers filename = ' a 12 character indentation.

What to change the above pyweb code the get rid of the spaces inside the string?

bgukw
  • 51
  • 4

1 Answers1

1

This looks like it may be a bug. Consider creating an issue here: https://github.com/slott56/py-web-tool

In order to get indentation right in Python, the weaver preserves the previous indentation level.

When creating a bug report, please include the smallest possible document that reproduces the problem, so it can become a unit test case.

S.Lott
  • 384,516
  • 81
  • 508
  • 779