Changeset 79729d5 in flex_extract.git for source/python/classes/MarsRetrieval.py
- Timestamp:
- Mar 8, 2019, 4:07:28 PM (5 years ago)
- Branches:
- master, ctbto, dev
- Children:
- d727af2
- Parents:
- 82c2959
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
source/python/classes/MarsRetrieval.py
rf20af73 r79729d5 1 #!/usr/bin/env python 1 #!/usr/bin/env python3 2 2 # -*- coding: utf-8 -*- 3 3 #******************************************************************************* … … 434 434 f.write(str(request_number) + ', ') 435 435 f.write(', '.join(str(attrs[key]) 436 for key in sorted(attrs. iterkeys())))436 for key in sorted(attrs.keys()))) 437 437 f.write('\n') 438 438 … … 474 474 # find all keys without a value and convert all other values to strings 475 475 empty_keys = [] 476 for key, value in attrs.ite ritems():476 for key, value in attrs.items(): 477 477 if value == '': 478 478 empty_keys.append(str(key)) … … 511 511 else: 512 512 request_str = 'ret' 513 for key, value in attrs.ite ritems():513 for key, value in attrs.items(): 514 514 request_str = request_str + ',' + key + '=' + str(value) 515 515 request_str += ',target="' + target + '"' … … 519 519 stderr=subprocess.PIPE, 520 520 bufsize=1) 521 pout = p.communicate(input=request_str )[0]521 pout = p.communicate(input=request_str.encode())[0] 522 522 print(pout.decode()) 523 523
Note: See TracChangeset
for help on using the changeset viewer.