[Wtr-general] Writing values to a file

2005-08-25 Thread Tonny Brown
Hi there, I was wondering how i can write some values to a file? t1=Time.now t2=3 t3=t1 + t2 puts t1 puts t3 f = File.new("testfile.txt", "w") How am I supposed to write the values of t1 and t3 to the file testfile.txt? thanks a lot

Re: [Wtr-general] Writing values to a file

2005-08-25 Thread Tonny Brown
thanks. all done. though i was thinking that if i wanted to update the text file and NOT replace it, I could not use the f.write command. Is that right? i.e. if i want to keep a log of the t1 and t3 values for a period of 1 minute, getting the values every 10 seconds, the f.write command cannot b

Re: [Wtr-general] Writing values to a file

2005-08-25 Thread Tonny Brown
Hmm almost there but I get the following error: '+': string can't be coerced into float (TypeError) it has to do with the + in f.write(t3 + "\n") __ Do you Yahoo!? Yahoo! Mail - You care about security. So do we. http://promotions.y