[Python-Dev] mknod for posixmodule
13 Apr 2002 11:16:07 +0100
Gustavo Niemeyer <email@example.com> writes:
> we need support for mknod() in python mode. This makes possible
> for python modules like tarfile.py to create special nodes.
I can believe it.
> The first option is of course adding a plain mknod(), with similar
> parameters to that found in the C interface, like other examples
> we have in the module. The closest interface would be something
> mknod(filename, mode, major, minor)
> But the mode parameter, like in the C interface, may be or'ed with
> S_IFREG, S_IFCHR, S_IFBLK, S_IFIFO. That seems unpythonic.
Generally, I think we wrap this sort of function as thinly as
possible. That way you can use the man page as help. And this isn't
the sort of function that fragile newbies are likely to trip over is
I don't remember any dirty green trousers.
-- Ian Jackson, ucam.chat