Re: help me to find the error

2009-07-10 Thread Terry Reedy
jhinak sen wrote: hi, i am a beginner in python language, Welcome to Python. i am trying with this programme : to find the addition and mean from a data set in a file and writing the mean and sum in some other file : This is three things: input data from, perform calculation, output data

Re: help me to find the error

2009-07-10 Thread Steven D'Aprano
On Fri, 10 Jul 2009 11:57:21 -0400, Dave Angel wrote: [...] > Please don' t top-post. Putting your reply out of order makes it harder > for others to see the sequences of things. Some people top-post > everything, but on this mailing list (and maybe most), the standard is > to add to bottom, or

Re: help me to find the error

2009-07-10 Thread Dave Angel
jhinak sen wrote: hey, thanx a lot :) i got ur points .. and it really helps.. and please also tell me ... where i can get more basic and detail knowledge of python.. as i am beginners in this , i need more examples of python programmes so that i can understand better. also if you know of any g

Re: help me to find the error

2009-07-10 Thread Dave Angel
jhinak sen wrote: hi, i am a beginner in python language, i am trying with this programme : to find the addition and mean from a data set in a file and writing the mean and sum in some other file : "" *#! /usr/bin/env python import re import cPickle as p import math from numpy import * f0= ope

Re: help me to find the error

2009-07-10 Thread Rhodri James
On Fri, 10 Jul 2009 10:41:03 +0100, jhinak sen wrote: hi, i am a beginner in python language, i am trying with this programme : to find the addition and mean from a data set in a file and writing the mean and sum in some other file : "" *#! /usr/bin/env python import re import cPickle as

Re: help me to find the error

2009-07-10 Thread Xavier Ho
I'm new to Python myself, but I think it's because the method readlist() returns a list. Hence, f0 is typed 'list'. And lists can't be closed. If you leave it to: *f0= open("temp9","r+") *and then assign another variable to the readlist, such as: *lines = f0.readlines()* Then in the for loop,