Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
binary_c-python
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Izzard, Robert Dr (Maths & Physics)
binary_c-python
Commits
27f5e33b
Commit
27f5e33b
authored
3 years ago
by
Izzard
Browse files
Options
Downloads
Patches
Plain Diff
still issues with the decorators...
parent
eb9d4cac
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
binarycpython/utils/dataIO.py
+16
-5
16 additions, 5 deletions
binarycpython/utils/dataIO.py
binarycpython/utils/spacing_functions.py
+1
-1
1 addition, 1 deletion
binarycpython/utils/spacing_functions.py
with
17 additions
and
6 deletions
binarycpython/utils/dataIO.py
+
16
−
5
View file @
27f5e33b
...
@@ -12,6 +12,7 @@ import json
...
@@ -12,6 +12,7 @@ import json
import
msgpack
import
msgpack
import
os
import
os
import
pathlib
import
pathlib
import
subprocess
import
time
import
time
from
typing
import
Union
,
Any
from
typing
import
Union
,
Any
...
@@ -734,9 +735,19 @@ class dataIO():
...
@@ -734,9 +735,19 @@ class dataIO():
def
NFSpath
(
self
,
path
):
def
NFSpath
(
self
,
path
):
"""
"""
Test path to see if it
'
s on an NFS mount.
Test path to see if it
'
s on an NFS mount.
"""
if
os
.
path
.
exists
(
path
)
and
os
.
path
.
ismount
(
path
):
s
=
os
.
stat
(
path
)
print
(
s
)
# use `stat -f -L -c %T "$_[0]"`=~/^nfs/io ? 1 : 0;
Args:
path : the path to be tested
Returns:
True : if on an NFS mount point.
False : if not.
None : if the path does not exist.
"""
if
os
.
path
.
exists
(
path
):
cmd
=
'
stat -f -L -c %T
"'
+
path
+
'"'
return
'
nfs
'
in
subprocess
.
Popen
(
cmd
,
shell
=
True
,
stdout
=
subprocess
.
PIPE
).
stdout
.
read
().
decode
()
else
:
return
None
This diff is collapsed.
Click to expand it.
binarycpython/utils/spacing_functions.py
+
1
−
1
View file @
27f5e33b
...
@@ -339,7 +339,7 @@ class spacing_functions():
...
@@ -339,7 +339,7 @@ class spacing_functions():
else
:
else
:
__decorator
=
__dummy_decorator
__decorator
=
__dummy_decorator
@__decorator
()
@__decorator
def
_const_dt
(
cachedir
=
None
,
def
_const_dt
(
cachedir
=
None
,
num_cores
=
None
,
num_cores
=
None
,
bse_options_json
=
None
,
# JSON string
bse_options_json
=
None
,
# JSON string
...
...
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