Live data from Hacker News

Show HN: First Crack, a simple static blog engine in Python

bitbucket.org

1–10 of 14 posts

Re: Show HN: First Crack, a simple static blog engine in Python

#5
My favourite static blog engine is a NIH fueled mix of NodeJS, Handlebars, fs-extra and some glue code. It takes about 10 minutes to knock one up and then you are blessed you can extend it using JS not whatever DSLs are thrown are you by the static site generator. There is a lot more help out there for JS problems than Hugo problems.

Re: Show HN: First Crack, a simple static blog engine in Python

#9
post #7

All you need to do to make this work with Python 3 is change your print statements (add parentheses) and change raw_input to input, as far as I can tell running it in python 3 locally. It seems to work perfectly with these ~20 seconds of changes.

Sounds like 2to3 should be able to magically fix it? I suppose adding "from future import print" and similar for input would keep it working for python2 too?

Ed: i think that should be:

from builtins import input

from __future__ import print_function

Re: Show HN: First Crack, a simple static blog engine in Python

#10
post #9
post #7

All you need to do to make this work with Python 3 is change your print statements (add parentheses) and change raw_input to input, as far as I can tell running it in python 3 locally. It seems to work perfectly with these ~20 seconds of changes.

Sounds like 2to3 should be able to magically fix it? I suppose adding "from future import print" and similar for input would keep it working for python2 too? Ed: i think that should be: from builtins import input from __future__ import print_function

Don't bother with python 2 compatibility, it's EOL in a few months. And 2to3 will probably work but even that is more effort than it needs to be.
Post reply on HN