On Jul 27, 10:02 am, alex23 <[EMAIL PROTECTED]> wrote: > Ugh, and in pointing our your inaccurate code I posted my own: > > > >>> f = open('dummy.txt','w') > > >>> f.write(line = 'this doesn't work') > > > File "<stdin>", line 1 > > f.write(line = 'this doesn't work') > > ^ > > SyntaxError: invalid syntax > > That should be: > > >>> f.write(line = "this doesn't work") > > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > TypeError: write() takes no keyword arguments > > Sorry about that :)
Lessons learned, should test codes even if you thought it seemed trivial. -- http://mail.python.org/mailman/listinfo/python-list