Suggest a feature
×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Python
Posted by: M. Chris
Added: Apr 24, 2019 9:01 AM
Views: 21
Tags: no tags
  1. try:
  2.     fh = open('/path/to/file', 'r')
  3.     # Store configuration file values
  4. except FileNotFoundError:
  5.     # Keep preset values