Lymkwi / python-minetest

A python library to manipulate minetest's files
6 stars 3 forks source link

Python Version #14

Open Eoldar opened 7 years ago

Eoldar commented 7 years ago

Hello,

Your code is very useful for one of my project ! Bur here i have another issue : Which version of python is it compatible with ? I made it work with Python3 but when i downgraded to Python2 (For some URL-modules problems), i seem to have a problem with the encoding. In the map.py, i have a "invalid literal for int() with base 10: '\x0f'". I don't really know if it's related to Python's version or if it's an error with the database map.sqlite.

Thank you for your answers :) Have a nice day ! Eoldar

Lymkwi commented 7 years ago

Hello! Sorry for the delay. I've been away for a while.

All of the files have been written for python3. Python2 is terrible when it comes to dealing with bytes and string encoding/decoding. It's also pretty painful to maintain code that uses such an old version of python, with its syntax and limitations.

So, yeah, you should run everything under python3. I do not think PIP, or whatever you installed python-minetest from, forced the python version, however, and I never looked up how to do that.