Mercurial > repos > george-weingart > micropita
comparison micropita_prepare.py @ 23:01ed8a261f09 draft
Use the current directory
author | george-weingart |
---|---|
date | Thu, 11 Aug 2016 11:36:36 -0400 |
parents | 1923f2a7e737 |
children | 1a2f01b31cf3 |
comparison
equal
deleted
inserted
replaced
22:8622858cc55f | 23:01ed8a261f09 |
---|---|
85 ################################################################################## | 85 ################################################################################## |
86 # Main Program # | 86 # Main Program # |
87 ################################################################################## | 87 ################################################################################## |
88 parser = read_params( sys.argv ) | 88 parser = read_params( sys.argv ) |
89 results = parser.parse_args() | 89 results = parser.parse_args() |
90 root_dir = os.environ.get('micropita_SCRIPT_PATH') #Using this | 90 #root_dir = os.environ.get('micropita_SCRIPT_PATH') #Using this |
91 #root_dir = root_dir = os.path.dirname(os.path.realpath(__file__)) #Find the current directory where the program resides GW 20160810 | 91 root_dir = root_dir = os.path.dirname(os.path.realpath(__file__)) #Find the current directory where the program resides GW 20160810 |
92 | 92 |
93 fname = results.inputname | 93 fname = results.inputname |
94 input_file = open(fname,'rU') | 94 input_file = open(fname,'rU') |
95 input_lines = input_file.readlines() | 95 input_lines = input_file.readlines() |
96 input_file.close() | 96 input_file.close() |