Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

check if path exists python

# importing os module 
import os
  
# Specify path
path = '/usr/local/bin/'
  
# Check if the path exists
isExist = os.path.exists(path)
print(isExist)
  
OUTPUT:
True  #if path exist
False #if path doesn't exist
Source by www.tutorialspoint.com #
 
PREVIOUS NEXT
Tagged: #check #path #exists #python
ADD COMMENT
Topic
Name
4+3 =