Skip to content

Commit

Permalink
Merge pull request #177 from josephsnyder/fix_parsegtmroutines
Browse files Browse the repository at this point in the history
Futurize ParesGTMRoutines.py
  • Loading branch information
josephsnyder authored Sep 30, 2019
2 parents 47b7a31 + 4e971cd commit d5f1df8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Testing/Python/ParseGTMRoutines.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import print_function
from builtins import range
#!/usr/bin/env python
#---------------------------------------------------------------------------
# Copyright 2013 The Open Source Electronic Health Record Agent
Expand Down Expand Up @@ -38,15 +40,15 @@ def parse_gtmroutines():
var = os.getenv('gtmroutines')
final_list = extract_m_source_dirs(var)
final_str = ';'.join(final_list)
print final_str
print(final_str)

def extract_m_source_dirs(var):
#First, replace unescaped spaces with semicolons
tmp = var.replace(" ",";").replace("\;","\ ")
tmpl = tmp.split(";")
num_elements = len(tmpl)
final_list = []
for ind in xrange(num_elements):
for ind in range(num_elements):
element = tmpl[ind]
element = element.strip(")")
paren_check = [m.start() for m in re.finditer("\(",element)]
Expand Down

0 comments on commit d5f1df8

Please sign in to comment.