Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fslpy
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
FSL
fslpy
Commits
cced3d12
Commit
cced3d12
authored
5 years ago
by
Martin Craig
Committed by
Paul McCarthy
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Rename input parameter and add return docstring
parent
a7c0dfd5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
fsl/utils/run.py
+5
-3
5 additions, 3 deletions
fsl/utils/run.py
with
5 additions
and
3 deletions
fsl/utils/run.py
+
5
−
3
View file @
cced3d12
...
...
@@ -398,16 +398,18 @@ def wslpath(patharg):
Convert a command line argument containing a Windows path to the equivalent WSL path (e.g. ``c:
\\
Users`` -> ``/mnt/c/Users``)
:param patharg: Command line argument which may (or may not) contain a Windows path. It is assumed to be
either of the form <windows path> or --arg=<windows path>
either of the form <windows path> or --<arg>=<windows path>
:return: If ``patharg`` matches a Windows path, the converted argument (including the --<arg>= portion). Otherwise
returns ``patharg`` unchanged.
"""
match
=
re
.
match
(
"
^(--[\w-]+=)?([a-zA-z]):(.+)$
"
,
path
)
match
=
re
.
match
(
"
^(--[\w-]+=)?([a-zA-z]):(.+)$
"
,
path
arg
)
if
match
:
arg
,
drive
,
path
=
match
.
group
(
1
,
2
,
3
)
if
arg
is
None
:
arg
=
""
return
arg
+
"
/mnt/
"
+
drive
.
lower
()
+
path
.
replace
(
"
\\
"
,
"
/
"
)
else
:
return
path
return
path
arg
def
wait
(
job_ids
):
"""
Proxy for :func:`.fslsub.wait`.
"""
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment