Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
intercepting I/O
#1
a module (tarfile) will be doing lots of I/O including things like opening file, creating directories,symlinks, block devices, character devices, and so on. i want to be able to intercept all of its filesystem operations and handle them. and this is for not just the archive, which it lets you do through the archive open by passing it an object with read() or write() methods. consider extracting a tar archive. for each file in that archive it reads, it will open a file to write the data it reads for that file in the archive. i need to intercept all of that. what i am hoping for is a generalized means to do that in Python itself as opposed to lots of hooks coded in the module. anyone know of such a thing?
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