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

node.js - How to mock a third-party api calls in the backend -

java - Could not locate OpenAL library -

Non Unique Username with ASP.Net Identity 2.0 -