[Tutor] Python 3.6 Extract Floating Point Data from a Text File

Stephen P. Molnar s.molnar at sbcglobal.net
Sun Apr 30 06:09:12 EDT 2017


I am using the Spyder v-3.1.2 IDE and porting a FORTRAN program that I 
wrote about 20 years ago to Python  Unfortunately, I am very much a 
novice in Python .

I would have managed to extract input data from another calculation (not 
a Python program) into the following text file.

LOEWDIN ATOMIC CHARGES
  ----------------------
     0 C :   -0.780631
     1 H :    0.114577
     2 Br:    0.309802
     3 Cl:    0.357316
     4 F :   -0.001065

What I need to do is extract the floating point numbers into a Python file

What I need to do is extract the floating point numbers into a Python file.

Googling the problem has not resulted on any insight as to the solution, 
and any help will be much appreciated.

Thanks in advance.

-- 
Stephen P. Molnar, Ph.D.		Life is a fuzzy set
www.molecular-modeling.net		Stochastic and multivariate
(614)312-7528 (c)
Skype: smolnar1


More information about the Tutor mailing list