A RetroSearch Logo

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

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/1999-December/001559.html below:

[Python-Dev] Missing POSIX functions: the list

[Python-Dev] Missing POSIX functions: the listGreg Ward gward@cnri.reston.va.us
Thu, 9 Dec 1999 12:12:00 -0500
On 09 December 1999, Andrew M. Kuchling said:
> After poking around in the O'Reilly POSIX book, here's a list of POSIX
> functions that don't seem to be available in Python.  Not all of them
> seem worth supporting.   Ironically, Greg Ward's daemonize() Perl
> subroutine, which started me on this, doesn't actually seem to need
> anything that Python doesn't have.

I think I already pointed this your way, but don't forget the man page
for Perl's POSIX module: "perldoc POSIX".  I suspect POSIX functions
that don't make sense in Perl also don't make sense in Python.

I agree with all your assessments about what's worth adding and what's
not, and that {close,read,open}dir() are questionable and probably not
worth the bother.  Random thoughts:

> abort() -- used in Py_FatalError(), but not accessible to Python code

Would this do the same as in C, ie. terminate the process and dump core?

> getlogin() -- returns user's login name
> 	 -- could do something similar with pwd.getpwuid( os.getuid() )[0], but
> 	 getlogin() apparently looks in utmp

With a documentation proviso that utmp is very old-fashioned, and you
really should do the getuid() thing unless you definitely want to get
the login ID from utmp.  Perhaps an alternate "getlogin" (different
name?) that does the getuid() thing could be provided.

        Greg



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