tfrederiksen / inelastica

Python package for eigenchannels, vibrations and inelastic electron transport based on SIESTA/TranSIESTA DFT
https://tfrederiksen.github.io/inelastica
GNU Lesser General Public License v3.0
33 stars 16 forks source link

Fix py3 incompatible usage of string module #47

Closed jonaslb closed 5 years ago

jonaslb commented 5 years ago

I ran into this issue when trying Inelastica out -- it would simply fail with the message that string module has no attribute named 'split'. It turns out that a lot of things were removed from the string module in python 3. Fortunately most fixes were doable by find-replace all (eg. string.atoi -> int) or regex.

As a fun fact, I found out that usage of some of these string module functions have been deprecated since version 2.0 of Python, released in 1991 (according to the py 2.7 docs). But others seem to have been removed as well in the py3 transition. Inelastica is now free of the string module.

zerothi commented 5 years ago

Great job Jonas!

tfrederiksen commented 5 years ago

Excellent! Thanks Jonas!