portable /dev/null again

John Belmonte john at neggie.net
Wed Mar 24 15:18:17 EST 2004


Skip Montanaro wrote:
> How about:
> 
>     class nullFile:
>         def _null(self, *args, **kwds):
>             pass
> 
>         def __getattr__(self, name):
>             return self._null

Hi,

Unless I'm misunderstanding your code, this object is not going to give 
me a legitimate file descriptor that I can pass to another program.

-John


-- 
http:// if  ile.org/




More information about the Python-list mailing list