Menu

#8 1.0.7 failed

v1.0_(example)
open
nobody
None
5
2017-06-27
2017-06-27
No

Hi,

Version 1.7.0 doesn't seem to work on Windows 10 / Python 2.7.
With the example from the documentation below:

$py(
# This starts the count at ONE as the incr is a preincrement.
H2_COUNT=0
# H2_COUNT is incremented each time H2 is called.
def H2(st):
    global H2_COUNT
    H2_COUNT+=1
    return "<h2>%d. %s</h2>" % (H2_COUNT,st)
)
$# the following makes H2 callable without another pair of enclosing brackets:
$extend(H2)\
$H2("First Section")
$H2("Second Section")
$H2("Conclusion")

Reslut:

expander -f test2.fx
Traceback (most recent call last):
  File "C:\DevTools\Python27\Scripts\expander.py", line 133, in <module>
    main()
  File "C:\DevTools\Python27\Scripts\expander.py", line 129, in main
    process_files(options,args)
  File "C:\DevTools\Python27\Scripts\expander.py", line 50, in process_files
    options.include)
  File "C:\DevTools\Python27\lib\site-packages\pyexpander\lib.py", line 1774, in expandFile
    return processToPrint(parseFile(filename, no_stdin_warning), filename,
  File "C:\DevTools\Python27\lib\site-packages\pyexpander\lib.py", line 130, in parseFile
    return parseString(st)
  File "C:\DevTools\Python27\lib\site-packages\pyexpander\lib.py", line 116, in parseString
    return EP.parseAll(EP.IndexedString(st), 0)
  File "C:\DevTools\Python27\lib\site-packages\pyexpander\parser.py", line 741, in parseAll
    (pos, elm)= parseDollar(idxst, m.start())
  File "C:\DevTools\Python27\lib\site-packages\pyexpander\parser.py", line 557, in parseDollar
    (a, b)= parseCode(idxst, m.end())
  File "C:\DevTools\Python27\lib\site-packages\pyexpander\parser.py", line 364, in parseCode
    rowcol= idxst.rowcol(pos))
pyexpander.parser.ParseException: end of bracket expression not found at line 1, col 4

Result of 1.6.0:

expander -f test2.fx

<h2>1. First Section</h2>
<h2>2. Second Section</h2>
<h2>3. Conclusion</h2>

Regards,
Laurent

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.