Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

try open file

try:
    with open("file.txt","r") as f:
        #stuff goes here
except IOError:
    #do what you want if there is an error with the file opening
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #open #file
ADD COMMENT
Topic
Name
8+7 =