Roel Schroeven wrote: > Danny Yoo wrote: > >>Looking at pageimgs(): I'm not sure what 't' means in the open statement: >> >> f = open(filename, "rt") > > It's not a typo. 't' opens the file in text mode.
Are you sure? Is that documented anywhere? Text mode is the default, you have to specify the 'b' if you want binary mode. And open() seems to accept any mode quite happily: >>> f=open('build.xml', 'rt') >>> f <open file 'build.xml', mode 'rt' at 0x0096C9B0> >>> f.close() >>> f=open('build.xml', 'rabcd') >>> f <open file 'build.xml', mode 'rabcd' at 0x0096C9F8> Kent _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor