def get_file_names_from_file_number(fds):
    names = []
for fd in fds:
    names.append(os.readlink('/proc/self/fd/%d' % fd))
return names
fds = get_open_fds()
print(get_file_names_from_file_number(fds))
Too many open files in python