evaleev / libint

Libint: high-performance library for computing Gaussian integrals in quantum mechanics
Other
230 stars 96 forks source link

Python3 incompatible test #137

Closed Micket closed 5 years ago

Micket commented 5 years ago

As the python2 era is coming to an end, this script needs some love: https://github.com/evaleev/libint/blob/af9e0fe19b25782d1865448fcfc9ab7da27240d6/tests/hartree-fock/hartree-fock%2B%2B-validate.py#L36 execfile isn't around anymore. Something like with open('./filename') as f: exec(f.read()) should suffice here.

evaleev commented 5 years ago

This code follows the recommended pattern in the docs:https://docs.python.org/3.3/whatsnew/3.0.html?highlight=execfile#builtins. .. besides the code does not use execfile, it uses exec.

Micket commented 5 years ago

It appears I was looking at the 2.5 release code and somehow missed that this was indeed already addressed.

Sorry for the noise.

evaleev commented 5 years ago

No worries. Another pair of eyes reviewing the code never hurts.