Sorry Mike, after seeing so many experts beat up others for not being
as smart as they are, I intrepreted your words incorrectly - my
apologies. I am not in the least bit against impproving my programming.
I liked what you did and thanks for the pointers.
Sheldon
--
Sheldon [EMAIL PROTECTED] writes:
So Mike if you can do better then do it then! There are many ways do
solve a problem, perhaps you have not learned that yet. At first this
guy didn't know what to do, so he had to begin somewhere. Now you can
take him much further, I am sure but the journey
Sheldon [EMAIL PROTECTED] writes:
after you have read the file then split it like this:
file = open('inputfile.txt', 'r').read()
import string
file = string.split(file,'\n')
You're doing things the hard way - at least if you have a modern
Python. The above can be done as:
file =
So Mike if you can do better then do it then! There are many ways do
solve a problem, perhaps you have not learned that yet. At first this
guy didn't know what to do, so he had to begin somewhere. Now you can
take him much further, I am sure but the journey might not be so
pleasant. Your attitude
Hi Kyrstian,
Try reading the file with ope(file,'r').read()
and then split the string using '\n' as the delimiter (this will break
the file down into each individual line consisting of several columns).
Then string split each line of the file (unsing ' ' as the delimiter),
they should now be 3,
I do not clearly understand what you say.
I am no going to change input files in anyway. I just want to read them
with Python, and postprocess.
I understand:
open(inputfile.txt, 'r').read()
However what you mean saying split the string using '\n'. Where should
I put it? After file name, or what?
I do not clearly understand what you say.
I am no going to change input files in anyway. I just want to read them
with Python, and postprocess.
I understand:
open(inputfile.txt, 'r').read()
However what you mean saying split the string using '\n'. Where should
I put it? After file name, or what?
hi!
i find it rather hard to understand your problem, but i'll try anyway:
[EMAIL PROTECTED] schrieb:
So.. for my future Python script, the input data are in form of:
1
1233.2E-3 2123.2323 2E+2 3453.3E+1
1233.2E-3 2123.2323 2E+2 3453.3E+1
1233.2E-3 2123.2323 2E+2 3453.3E+1
Dear Python Community,
I am an engineering and I am experiencing some trouble. Having output
data from other software I want to use it. To achieve this I decided to
use Python since this language is the best known for me.
So.. for my future Python script, the input data are in form of:
1