Menu

#1 pyt fails if any chunk of text starts with a pyt command nam

open
nobody
None
5
2009-03-09
2009-03-09
Anonymous
No

#!/usr/bin/python
"""
Shows pyt error...

If a chunk of text happens to start with the name of a pyt command
like ('list', 'exec', 'embed', 'if', 'while', 'link'), then pyt
crashes and burns.

"""
import pyt

p = pyt.pyt("""\ my items
<[list]>
item %(j)d
<[for j in range(1,3)]>""")

print p.run(globals())

p = pyt.pyt("""\ list of my items
<[list]>
item %(j)d
<[for j in range(1,3)]>""")

print p.run(globals())

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.