On Thu, Oct 22, 2009 at 9:26 AM, Matti Airas <[email protected]> wrote: > ext Marcelo Lira wrote: > Regarding the content, another issue here is that you argued that QFile > should not open the file automatically, yet you are doing that right here. > At a minimum, probably the syntax would have to be something like > > with QFile("/tmp/file.txt").open(QFile.ReadOnly) as f: > ... > > Or are you suggesting a default __enter__ method that would open the file > readonly?
Hmm good point. I didn't notice the the open mode is passed on the open method for QFile. In this case, it looks saner IMHO to open the file automatically on instantiation (but with a way to set the open mode). Regards, -- Anderson Lizardo OpenBossa Labs - INdT Manaus - Brazil _______________________________________________ PySide mailing list [email protected] http://lists.openbossa.org/listinfo/pyside
