Python Library and Scripts for Analyzing X-ray Spectra