gilestrolab / pySolo-Video

pySolo video extension
http://www.pysolo.net
5 stars 10 forks source link

The enternal python2 vs python3. #5

Closed qgeissmann closed 9 years ago

qgeissmann commented 9 years ago

Sharing python2 and python3 on the same project is a bit doggy. I would rather adopt python3 once for all. The problem with python3 is mainly the compatibility issue with opencv < 3.0. AFAIK, opencv3.0, and therefore opencv-git/master, are python3 friendly. opencv3.0 should be stable after new year (http://opencv.org/opencv-3-0-alpha.html).

ggilestro commented 9 years ago

Where is python3 used in pysolo video?! Everything I coded was intended for python2 - possibly Luis has introduced some python3 syntax?

Anyway, I would not want to switch to pyhton3 until it's stable on all platforms but I am ok making the project python3-ready.

qgeissmann commented 9 years ago

I was chatting with Guilherme last time and he was telling me that the server stack (bottle et al. run python3).

ggilestro commented 9 years ago

They run on python2 just as fine.

qgeissmann commented 9 years ago

If we are making it python2, of course, we should make it python3 firendly.

qgeissmann commented 9 years ago

I have not checked whether they run (there are still nasty merging conflict on master), but there seem to have python3 specific syntax (e.g. print("hello") without the import __future__ trick)...

ggilestro commented 9 years ago

yes I very swiftly did have a check now that I remember that but it was few instance with single arguments and they are ok ( http://stackoverflow.com/questions/12162629/using-print-in-python2-x ) I tried with python2 back when I was fixing Luis' stuff and everything was running I think

qgeissmann commented 9 years ago

@PolygonalTree do you see any reason why we should not use a python2 (python3 friendly) framework for now? If you are fine with python2, I make it 'official' and close the issue.

PolygonalTree commented 9 years ago

The server was the only place where I use python3 syntax but all the dependencies are python2 and 3 compatible so everything works in both. The print syntax, as Giorgio has pointed is valid for python2 and python3. The other way around is not.
Just because of openCV I will do it python2 (python3 friendly).