Running python 2 from python 3 with Wrapper

I have an application written in Python 3, but I need one special TELAPI function ( https://github.com/TelAPI/telapi-python/ ) that is only available for Python 2.

Is it possible that I can wrap my Python 2 code and call it from Python 3?

+3


source to share


2 answers


You can try using PythonFuture , which has a translation package that allows Python 2 to only use dependencies in Python 3 code.



0


source


http://docs.python-guide.org/en/latest/dev/virtualenvs/ will do the job. Although it's almost always better to recode your code to Python 3, unless you need to use legacy code



-1


source







All Articles