Skip to content

Commit 69379c6

Browse files
committed
reorder function definition _parallel_task
1 parent 4178e1d commit 69379c6

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

maxfilter_demo.py

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,21 @@ def check_path_exists(chkpath):
3131
else:
3232
raise
3333

34+
def _parallel_task(command):
35+
"""
36+
General purpose method to submit Unix executable-based analyses (e.g.
37+
maxfilter and freesurfer) to the shell.
38+
39+
Parameters:
40+
command: The command to execute (single string)
41+
42+
Returns: The return code (shell) of the command
43+
"""
44+
#proc = subprocess.Popen([fs_cmd],stdout=subprocess.PIPE, shell=True)
45+
proc = subprocess.Popen([command], shell=True)
46+
47+
proc.communicate()
48+
return proc.returncode
3449

3550
proj_code = 'MINDLAB2013_03-MEG-BlindPerception'
3651
proj_path = '/projects/' + proj_code
@@ -171,18 +186,3 @@ def check_path_exists(chkpath):
171186
print "%s" % cmd
172187
# cleanup
173188

174-
def _parallel_task(command):
175-
"""
176-
General purpose method to submit Unix executable-based analyses (e.g.
177-
maxfilter and freesurfer) to the shell.
178-
179-
Parameters:
180-
command: The command to execute (single string)
181-
182-
Returns: The return code (shell) of the command
183-
"""
184-
#proc = subprocess.Popen([fs_cmd],stdout=subprocess.PIPE, shell=True)
185-
proc = subprocess.Popen([command], shell=True)
186-
187-
proc.communicate()
188-
return proc.returncode

0 commit comments

Comments
 (0)