

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
What is a file descriptor used in Python?
File descriptors are a low-level facility for working with files directly provided by the OS kernel. A file descriptor is an integer that identifies the open file in a table of open files kept by the kernel for each process. A number of system calls accept file descriptors, but they are not convenient to work with, typically requiring fixed-width buffers, multiple retries in certain conditions, and manual error handling.
File objects are Python classes that wrap file descriptors to make working with files more convenient and less error-prone. For example, they provide error-handling, buffering, line-by-line reading and are closed when garbage collected.
- Related Questions & Answers
- What is a JAR file?
- Importance of Module Descriptor in a Module in Java 9?
- What is a TestNG xml file in TestNG?
- What is a Distributed File System (DFS)?
- What is a Selector and how it is used in CSS?
- How to check if a file is a directory or a regular file in Python?
- What are the types of system calls used in file management?
- What is CSS and why it is used?
- What is an array and what is it used for?
- What is the keyword used in instantiating a class in Java?
- What is HTML5 file Blob.slice() method
- What are the attributes of a file object in Python?
- What should be the Python class order in a file?
- What method is used to create a daemon thread in Java?
- What is Get-Content in PowerShell used for?
Advertisements