Python | os.supports_bytes_environ object

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 in Python checks whether native OS type of the environment is bytes or not. For example, Windows do not has bytes as their native OS type of the environment. So its value will be False on Windows.

Syntax: os.supports_bytes_environ



Parameter: It is a non-callable object. Hence, no parameter is required.

Return Type: This object returns a bool value True of False on the basis of whether native OS type of the environment is bytes or not.

Code: Use of os.supports_bytes_environ to check whether native OS type of the environment is bytes or not.

filter_none

edit
close

play_arrow

link
brightness_4
code

# 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 result
print(isBytes)

chevron_right


Output:

True


My Personal Notes arrow_drop_up

self motivated and passionate programmer

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.




Article Tags :

Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.