Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

try catch python with open

import os ,csv
# Created to ensure file/dataset are being load properly
# Place below your filename with .csv where 'x' is .
data = open('x', 'r')
while True:
  try:
  	if data == open('x'):
  		print('file is open')
  except IOError:
    print('Unable to load files')
    break
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #catch #python #open
ADD COMMENT
Topic
Name
5+2 =