In <[EMAIL PROTECTED]>, Ritesh Raj Sarraf wrote: > Also, > f = file ('some_file.jpg') > > throws an error. > "str object is not callable"
This happens if you rebind names of builtins. In this case to a string. Don't do that! In [5]:file Out[5]:<type 'file'> In [6]:file = 'foo.txt' In [7]:file Out[7]:'foo.txt' In [8]:file('x') --------------------------------------------------------------------------- exceptions.TypeError Traceback (most recent call last) /home/bj/<ipython console> TypeError: 'str' object is not callable Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list