Open In App

Python | os.supports_bytes_environ object

Last Updated : 10 Oct, 2021
Comments
Improve
Suggest changes
Like Article
Like
Report

OS module in Python provides functions for interacting with the operating system. OS comes under Python’s standard utility modules. This module provides a portable way of using operating system dependent functionality.
os.supports_bytes_environ object in Python is used to check whether the native OS type of the environment is bytes or not. 
Functionality of some methods and objects like os.getenvb() and os.environb are available in Python only if the value of os.supports_bytes_environ is True.
For example: The native OS type of the environment on Windows is not bytes. So os.supports_bytes_environ is False and hence, os.getenvb() and os.environb are not available on Windows. 
 

Syntax: os.supports_bytes_environ 
Parameters: This is a non-callable object. Hence, no parameter is required
Return Type: This method returns a Boolean value of class bool. This method returns True if the native OS type of the environment is bytes otherwise returns False. 
 


Code: use of os.supports_bytes_environ object 
 

Python3
# Python program to explain os.supports_bytes_environ object 
  
# importing os module 
import os

# Check whether the native OS
# type of the environment is
# bytes or not
isBytes = os.supports_bytes_environ


# Print the result
print(isBytes) 

Output: 
True

 

Next Article
Practice Tags :

Similar Reads

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy