[Python-Dev] mknod for posixmodule (original) (raw)
Michael Hudson mwh@python.net
13 Apr 2002 11:16:07 +0100
- Previous message: [Python-Dev] mknod for posixmodule
- Next message: [Python-Dev] mknod for posixmodule
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Gustavo Niemeyer <niemeyer@conectiva.com> writes:
People,
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 like:
mknod(filename, mode, major, minor) But the mode parameter, like in the C interface, may be or'ed with SIFREG, SIFCHR, SIFBLK, SIFIFO. 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 it?
Cheers, M.
-- I don't remember any dirty green trousers. -- Ian Jackson, ucam.chat
- Previous message: [Python-Dev] mknod for posixmodule
- Next message: [Python-Dev] mknod for posixmodule
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]