What is the correct way (if any) to use Python 2 and 3 libraries in the same program? -


i wish write python script needs task 'a' , task 'b'. luckily there existing python modules both tasks, unfortunately library can task 'a' python 2 only, , library can task 'b' python 3 only.

in case libraries small , permissively-licensed enough convert them both python 3 without difficulty. i'm wondering "right" thing in situation - there special way in module written in python 2 can imported directly python 3 program, example?

the "right" way translate py2-only module py3 , offer translation upstream pull request (or equivalent approach non-git upstream repos). seriously. horrible hacks make py2 , py3 packages work not worth effort.


Comments

Popular posts from this blog

c++ - Delete matches in OpenCV (Keypoints and descriptors) -

java - Could not locate OpenAL library -

sorting - opencl Bitonic sort with 64 bits keys -