What is the best way to communicate between a Python 3.x and a Python 2.x program?
We're writing a web app whose front end servers will be written in Python 3 (CherryPy + uWSGI) primarily because it is unicode heavy app and Python 3.x has a cleaner support for unicode.
But we need to use systems like Redis and Boto (AWS client) which don't yet have Python 3 support.
Hence we need to create a system in which we can communicate between Python 3.x and 2.x programs.
What do you think is the best way to do this?
The best way? Write everything in Python 2.x. It's a simple question: can I do everything in Python 2.x? Yes! Can I do everything in Python 3.x? No. What's your problem then?
But if you really, really have to use two different Python versions ( why not two different languages for example? ) then you will probably have to create two different servers ( which will be clients at the same time ) which will communicate via TCP/UDP or whatever protocol you want. This might actually be quite handy if you think about scaling the application in the future. Although let me warn you: it won't be easy at all.
communication between Python 3 and Python 2