Python Forum
looks like i need to learn ...
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
looks like i need to learn ...
#1
looks like i need to learn interfacing Python to C. just too many syscalls that are not implemented.
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply
#2
This is a rather cryptic statement. What are you trying to do?
Reply
#3
... a number of different syscalls that i could not find an implementation or stub for, such as pivot_root() and utimensat().
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply
#4
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...
Reply
#5
i searched the Python library manual for "utimens" and found nothing that way. what should i have searched for?
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply
#6
Skaperen Wrote:what should i have searched for?
At some point, there was utimensat in the Python library.
Reply
#7
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.
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply
#8
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.
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020