Re: How to subclass file

2008-05-15 Thread Gabriel Genellina
En Wed, 14 May 2008 21:23:26 -0300, Yves Dorfsman <[EMAIL PROTECTED]> escribió: I want to create a subclass of 'file' but need to open the file with os.open (because I want to open it in exclusive mode), and need an additional method. Because I need an additional method, I truly need a ob

How to subclass file

2008-05-14 Thread Yves Dorfsman
I want to create a subclass of 'file' but need to open the file with os.open (because I want to open it in exclusive mode), and need an additional method. Because I need an additional method, I truly need a object of my sublass. If I do something like class myFile(file): def __new__(cls, filen