code {poems}: t.s. eliot
27 Jun 2014artist/designer Ishac Bertran has this really cool project called code {poems}: a compilation (ha!) of compilable poems in code.
Inspired by this, this afternoon I began to dabble in a bit of my own code poetry.
theHollowMen.py
“”"
T.S. Eliot, 1925
cat, 2014.06.27
Draft1
"""
class World:
def __str__(self):
return "this is the way the world ends"
def ends(self):
return ["whimper"]
def main():
world = World()
for i in range(4):
print world
if "bang" not in world.ends():
print "not with a bang"
if "whimper" in world.ends():
print "but with a whimper"
if __name__ == "__main__":
main()
to run, download source and run python theHollowMen.py
.
repo here.
more to come.