fileno() 메서드는 스트림의 파일 디스크립터(file descriptor)를 숫자로 반환합니다.
os가 파일 디스크립터를 사용하지 않으면 에러가 발생합니다.
매개변수는 없습니다.
f = open("demofile.txt", "r") print(f.fileno())
결과
3
11 파이썬에서 string, datetime으로 정렬하기
11 Python에서 exception이 생긴 라인 숫자값을 어떻게 구할 수 있나요?
14 에러가 있는데 Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding Python runtime state: core initialized ModuleNotFoundError: No module named 'encodings'
17 파이썬에서 The driver cannot recognize the specified command parameter 에러 해결방법
13 python에서 TikTokLive.types.errors.LiveNotFound 에러 해결방법
© 2022 pinfo. All rights reserved.