sobjornstad / AnkiLPCG

Addon for dae/anki for studying lyrics and poetry

Home Page:https://ankilpcg.readthedocs.io/en/latest/index.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support for Python 3+

fabswt opened this issue · comments

Hello,

Using the latest version of Python, I could not get AnkiLPCG to work.

As it turns out, this is because of the new behavior of the print function in Python 3+ (now an actual function, not a language construct anymore). See this thread: http://stackoverflow.com/questions/826948/syntax-error-on-print-with-python-3

After fixing the function for myself inside of the script, however, executing the script would result in a file not found error (sorry I don't have a copy of this as I've downgraded Python in the meantime). It happened both when running the script from Windows (and then I wouldn't be offered the chance to specify the Input File, Title and Tags) and from the command-line.

Thanks for reading!
Fabien

A lot of software (dare I even say the majority) still uses 2.7, and 3.0 is not backwards-compatible, so I'm not too inclined to port it at the moment, but I will at least add a note to the readme that it requires version 2.7.

I also considered adding a check that would give a more helpful error message upon running with Python 3, but the only way to do that is to add a second file, and in this case I'm not sure there's a compelling case to do so just for this.

I have added the readme note, though.