A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2002-April/023204.html below:

[Python-Dev] mknod for posixmodule

[Python-Dev] mknod for posixmoduleGustavo Niemeyer niemeyer@conectiva.com
Sat, 13 Apr 2002 03:59:36 -0300
People,

we need support for mknod() in python mode. This makes possible
for python modules like tarfile.py to create special nodes.

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
S_IFREG, S_IFCHR, S_IFBLK, S_IFIFO. That seems unpythonic. The
other option that comes to my mind is:

mknod(filename, mode, type, major, minor)

That would make more explicit the need for type. OTOH, we already
have in the library functions for creating fifos and regular
files (S_IFIFO and S_IFREG). So there's another option:

mkblkdev(filename, mode, major, minor)
mkchrdev(filename, mode, major, minor)

What do you think?

-- 
Gustavo Niemeyer

[ 2AAC 7928 0FBF 0299 5EB5  60E2 2253 B29A 6664 3A0C ]




RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4