Python 3.6 Extract Floating Point Data from a Text File

11 views
Skip to first unread message

Stephen P. Molnar

unread,
May 1, 2017, 2:09:05 PM5/1/17
to spyder
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.

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

Thanks in advance.
Reply all
Reply to author
Forward
0 new messages