0

I have a situation where I need to deploy a python code but this uses 3rd party module and it requires some 3rd party program installation (the 3rd party module uses some DLLs/files/*.exe from the directory).

The problem is that the program itself is very very large (>10G) and I'd like to 'extract' only the files that the script 'touched' during execution.

So in a pseudocode:

import module_3rd_party

def my_process(data):
    ....
return data

def main(file):

    customObj = module_3rd_party.load(file)
    customObj = module_3rd_party.reformat(customObj)
    customObj = module_3rd_party.some_compile_func(customObj)

    processed = my_process(customObj)

return processed

How do I figure out what files that module_3rd_party.load() / module_3rd_party.reformat() / module_3rd_party.some_compiled_func(), ever touched (not necessarily 'modified')?

I don't know where to begin so any suggestion is very welcomed.

user3655233
  • 91
  • 1
  • 1
  • 6
  • Maybe [check what files are open in Python](https://stackoverflow.com/questions/2023608/check-what-files-are-open-in-python) helps as well with the 3rd party programs but not sure if that assignes the results to the opening functions as well. – MagnusO_O Sep 07 '22 at 15:58

0 Answers0