Python Forum

Full Version: looks like i need to learn ...
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
looks like i need to learn interfacing Python to C. just too many syscalls that are not implemented.
This is a rather cryptic statement. What are you trying to do?
... a number of different syscalls that i could not find an implementation or stub for, such as pivot_root() and utimensat().
If I understand well, os.utime() has a ns argument that achieves the functionality of utimensat.

Also the butter project in Pypi claims it has pivot_root(). I have not tried it...
i searched the Python library manual for "utimens" and found nothing that way. what should i have searched for?
Skaperen Wrote:what should i have searched for?
At some point, there was utimensat in the Python library.
was it removed or renamed?

they could implement support for the -at functions by allowing a 2-tuple of (int,str/bytes) in place of str/bytes for the file path. then no new names would be needed. i wonder if they did that with this as a 3rd option.
to represent nanoseconds in float would require 61 bits of precision. but float is C double which is only 53 bits on x86/amd platforms. they just barely achieve microsecond precision (51 bits needed). so something more is needed:
  1. C long double (64 bits)
  2. decimal.Decimal
  3. (sec,nsec)
  4. more function names
or else not have nanosecond support.

just because a bunch of low numbers can be unique in float does not mean higher ones can. in platforms with 32 bits, int values for seconds can be as high as 2**31-1 (signed). that uses 31 bits of the available precision in float, leaving 22 bits for a fractional part. today is just 1 bit short of that.

i can dream of a world where the standard float size has at least 64 bits of precision. but i must wake up to review python-forum.