Mercurial > repos > george-weingart > micropita
comparison micropita_prepare.py @ 3:b4cf8c75305b draft default tip
Pointing to the right root directory
| author | george-weingart |
|---|---|
| date | Tue, 30 Aug 2016 13:10:34 -0400 |
| parents | 2f4f6f08c8c4 |
| children |
comparison
equal
deleted
inserted
replaced
| 2:cdef6996e3f3 | 3:b4cf8c75305b |
|---|---|
| 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') | 90 #######root_dir = os.environ.get('micropita_SCRIPT_PATH') |
| 91 | 91 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() |
