as passwd: print(passwd.fileno()) passwd.closed try: print(passwd.fileno()) except ValueError: print("The file already has closed") # ϑΝΠϧΛด͡Δͱফ͑Δ $ python3 5_processes_have_file_descriptors_closed_file.2.py 3 The file already has closed 16 Y8 2017 2017/05/27 - Ozawa Shuhei ( @oza_shu )