Re: Reading from input file.

2006-01-13 Thread Sheldon
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 --

Re: Reading from input file.

2006-01-13 Thread Mike Meyer
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

Re: Reading from input file.

2006-01-12 Thread Mike Meyer
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 =

Re: Reading from input file.

2006-01-12 Thread Sheldon
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

Re: Reading from input file.

2006-01-11 Thread Sheldon
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,

Re: Reading from input file.

2006-01-11 Thread paczkow
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?

Re: Reading from input file.

2006-01-11 Thread paczkow
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?

Re: Reading from input file.

2006-01-11 Thread David Murmann
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

Reading from input file.

2006-01-10 Thread paczkow
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