Re: [Tutor] Problems writing data into a file

2006-12-18 Thread Luke Paireepinart
> for x in range(1,226): > # g=open('output', 'w') > y1=m.extract('TEMP',32, 1131, component='1', cycle=x, subcycle=1) > y2=m.extract('PRES',32, 1131, component='1', cycle=x, subcycle=1) > # testout = (x,y1,y2,'\n') > # line = str(testout) > # g.write(line) > print x,y1,y2 >

[Tutor] Problems writing data into a file

2006-12-18 Thread Stefan Heyne
Hi there, I am newby to python and have some problems getting data into a file I am using python to extract data from a database but currently i only get it to print the data on the screen so I have to copy/paste it into a file later on. There for sure is a way to do that but I couldn't figu