Python

Python Menu

Python

Python File fileno() - Definition, Syntax, Parameters, Examples

Definition

The fileno() method returns the file descriptor of the stream, as a number. An error will occur if the operator system does not use a file descriptor.

Syntax

file.fileno()

Parameters

No Parameters.

Examples:

f = open("myFile.txt", "r")
print(f.fileno())

Introduction

Python Basics

Python Advance

Data Science Python Tutorials

Python Functions and Methods