Re: Reading Fortran Ascii output using python

2016-11-03 Thread Heli
On Monday, October 31, 2016 at 8:03:53 PM UTC+1, MRAB wrote: > On 2016-10-31 17:46, Heli wrote: > > On Monday, October 31, 2016 at 6:30:12 PM UTC+1, Irmen de Jong wrote: > >> On 31-10-2016 18:20, Heli wrote: > >> > Hi all, > >> > > >> > I am trying to read an ascii file written in Fortran90 using

Re: Reading Fortran Ascii output using python

2016-10-31 Thread MRAB
On 2016-10-31 17:46, Heli wrote: On Monday, October 31, 2016 at 6:30:12 PM UTC+1, Irmen de Jong wrote: On 31-10-2016 18:20, Heli wrote: > Hi all, > > I am trying to read an ascii file written in Fortran90 using python. I am reading this file by opening the input file and then reading using: >

Re: Reading Fortran Ascii output using python

2016-10-31 Thread Irmen de Jong
On 31-10-2016 19:24, Irmen de Jong wrote: > So there must be something in that line in your file that it considers an EOF. I meant to type EOL there. (end-of-line/newline). Irmen -- https://mail.python.org/mailman/listinfo/python-list

Re: Reading Fortran Ascii output using python

2016-10-31 Thread Irmen de Jong
On 31-10-2016 18:46, Heli wrote: > Thanks Irmen, > > I tried with "rU" but that did not make a difference. The problem is a line > that with one single write statement in my fortran code : > > write(UNIT=9,FMT="(99g20.8)") value > > seems to be read in two python inputfile.readline(). > >

Re: Reading Fortran Ascii output using python

2016-10-31 Thread Heli
On Monday, October 31, 2016 at 6:30:12 PM UTC+1, Irmen de Jong wrote: > On 31-10-2016 18:20, Heli wrote: > > Hi all, > > > > I am trying to read an ascii file written in Fortran90 using python. I am > > reading this file by opening the input file and then reading using: > > > >

Re: Reading Fortran Ascii output using python

2016-10-31 Thread Irmen de Jong
On 31-10-2016 18:20, Heli wrote: > Hi all, > > I am trying to read an ascii file written in Fortran90 using python. I am > reading this file by opening the input file and then reading using: > > inputfile.readline() > > On each line of the ascii file I have a few numbers like this: > > line

Reading Fortran Ascii output using python

2016-10-31 Thread Heli
Hi all, I am trying to read an ascii file written in Fortran90 using python. I am reading this file by opening the input file and then reading using: inputfile.readline() On each line of the ascii file I have a few numbers like this: line 1: 1 line 2: 1000.834739 2000.38473 3000.349798 line