markovmodel / msmtools

Tools for estimating and analyzing Markov state models
GNU Lesser General Public License v3.0
40 stars 26 forks source link

python3 compatibility #18

Closed marscher closed 9 years ago

marscher commented 9 years ago
marscher commented 9 years ago

the failure for py3k is due to a bug in numpy.loadtxt numpy/numpy/issues/5655 we should consider using genfromtxt then?

marscher commented 9 years ago

if there are now further comments, I will merge soon.

franknoe commented 9 years ago

Are all the changes of this sort:

from committor_test to from .committor_test

desired or recommended? I thought local imports using dots ./.. are discouraged, but perhaps this is only for true for ..

Otherwise, I'm fine with merging

marscher commented 9 years ago

Python3 default import behaviour is to do absolute imports, in this case we have to explicitly use relative imports, because otherwise it does not work.

franknoe commented 9 years ago

Ah thanks. Should we then generally do imports absolute in the future?

Am 14/07/15 um 17:13 schrieb Martin K. Scherer:

Python3 default import behaviour is to do absolute imports, in this case we have to explicitly use relative imports, because otherwise it does not work.

— Reply to this email directly or view it on GitHub https://github.com/markovmodel/msmtools/pull/18#issuecomment-121278479.


Prof. Dr. Frank Noe Head of Computational Molecular Biology group Freie Universitaet Berlin

Phone: (+49) (0)30 838 75354 Web: research.franknoe.de

Mail: Arnimallee 6, 14195 Berlin, Germany

marscher commented 9 years ago

Am 14.07.2015 um 17:15 schrieb Frank Noe:

Ah thanks. Should we then generally do imports absolute in the future? the first import line should state

from future import absolute_import # to have the same behaviour in py2 and py3

and I encourage to use absolute imports default. On implementation level relative ones should be ok, but there is no more implicit relative allowed anymore.