Python | os.path.supports_unicode_filenames 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.path module is sub module of OS module in Python used for common path name manipulation.

os.path.supports_unicode_filenames object in Python is used to check whether an arbitrary Unicode strings can be used as filenames or not.

os.path.supports_unicode_filenames is always False on posix systems except Darwin, because posix systems don’t care about the encoding of the filename. They treat filenames simply as a byte sequence.



Syntax: os.path.supports_unicode_filenames

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 system supports Unicode string as filename otherwise returns False.

Code: use of os.path.supports_unicode_filenames object

filter_none

edit
close

play_arrow

link
brightness_4
code

# Python program to explain os.path.supports_unicode_filenames object 
    
# importing os module 
import os
  
# Check whether an arbitrary Unicode
# string can be used as
# a filename or not 
support = os.path.supports_unicode_filenames
  
  
# Print the result
print(support) 

chevron_right


Output:

False

os.path.supports_unicode_filenames



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.