Author: bugman
Date: Thu Sep 4 16:46:42 2014
New Revision: 25637
URL: http://svn.gna.org/viewcvs/relax?rev=25637&view=rev
Log:
Python 3 fix for the lib.periodic_table module.
The Python string module does not exist in Python 3.
Modified:
tags/3.3.0/lib/periodic_table.py
Modified: tags/3.3.0/lib/periodic_table.py
URL:
http://svn.gna.org/viewcvs/relax/tags/3.3.0/lib/periodic_table.py?rev=25637&r1=25636&r2=25637&view=diff
==============================================================================
--- tags/3.3.0/lib/periodic_table.py (original)
+++ tags/3.3.0/lib/periodic_table.py Thu Sep 4 16:46:42 2014
@@ -34,7 +34,6 @@
# Python module imports.
from numpy import array, average, float64
from re import search, split
-from string import lower, upper
# relax module imports.
from lib.errors import RelaxError
@@ -95,9 +94,9 @@
"""
# The format is uppercase first letter, lowercase second.
- new_symbol = upper(symbol[0])
+ new_symbol = symbol[0].upper()
if len(symbol) == 2:
- new_symbol += lower(symbol[1])
+ new_symbol += symbol[1].lower()
# Return the corrected atomic symbol.
return new_symbol
_______________________________________________
relax (http://www.nmr-relax.com)
This is the relax-commits mailing list
[email protected]
To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-commits