Using Python 3.1 and 2.5 together

I am currently working on a final project for my programming class. We write it in Python 3.1, and I am doing the GUI. My team leader wants to make the whole project in 3.1, but most pyGame add-ons (like pyConsole) give me compatibility issues.

So my question is: can I write my interface in 2.5, and then connect it to the engine written in 3.1? Thank you for your help!

+7
source share
2 answers

Honestly, this is probably more of a problem than it costs.

It’s best to get together and make a list of add-ons that you guys want to use and whether they are compatible with 3.1. Then decide if you can live without the incompatible. If you cannot, run the project in version 2.5, otherwise use 3.1 and you have "Plan B" for add-ons that you cannot use.

If you are careful, you can make the transition from 2 to 3 relatively painless later when these add-ons add 3.x support.

If this is a project that you plan to work on for a long time (i.e. more than just a class project), I would probably say that you need to go with 3 and try porting some add-ons yourself. But for the final class project, this is probably not worth it.

+6
source

Short answer no.

Longer answer. You can write your interface with Python 2.5 and the backend with 3.0, but they cannot interact at all. You need some kind of abstraction layer between them. By doing something like this, you can have any language on the other side.

The layer of abstraction will have to make the work on them work and return to some queue. This is just a stupid example and can become very complicated when you walk through. As a result, the level of abstraction can become even more complex than your application, considering it work for the class.

I would listen to Jeremiah and talk with the professor about the goods and the bad that you are going to with Python 2.5 or 3.0. If you include an explanation of the reasons why you choose each other in your last papper, I’m sure that you will get extra points, and he is unlikely to be called.

+3
source

All Articles