> file = raw_input("File name please: ")
> f = file(file, "r")

The problem is you used 'file' as a name. But file() is the function 
to open a file. So in the second line you call your filename as 
if it was a function!

Try using 'filename' for your variable instead. It's never a good 
idea to use a python built-in name as a variable.

You could just use open() instead of file() of course but 
thats probably not such a good solution!

HTH,

Alan G
Author of the Learn to Program web tutor
http://www.freenetpages.co.uk/hp/alan.gauld
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to