Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OBITools3
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
21
Issues
21
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
OBITools
OBITools3
Commits
d09aa431
Commit
d09aa431
authored
Oct 31, 2018
by
Celine Mercier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cython API: added a function to get the full path to the DMS directory
parent
123e5dc0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
0 deletions
+16
-0
python/obitools3/dms/capi/obidms.pxd
python/obitools3/dms/capi/obidms.pxd
+1
-0
python/obitools3/dms/dms.pyx
python/obitools3/dms/dms.pyx
+15
-0
No files found.
python/obitools3/dms/capi/obidms.pxd
View file @
d09aa431
...
...
@@ -16,6 +16,7 @@ cdef extern from "obidms.h" nogil:
struct
OBIDMS_t
:
const_char_p
dms_name
const_char_p
directory_path
OBIDMS_infos_p
infos
ctypedef
OBIDMS_t
*
OBIDMS_p
...
...
python/obitools3/dms/dms.pyx
View file @
d09aa431
...
...
@@ -38,10 +38,12 @@ cdef class DMS(OBIWrapper):
cdef
inline
OBIDMS_p
pointer
(
self
)
:
return
<
OBIDMS_p
>
(
self
.
_pointer
)
@
staticmethod
def
obi_atexit
()
:
atexit
(
obi_close_atexit
)
@
staticmethod
def
open_or_new
(
object
dms_name
)
:
cdef
OBIDMS_p
pointer
...
...
@@ -56,6 +58,7 @@ cdef class DMS(OBIWrapper):
dms
=
OBIWrapper
.
new_wrapper
(
DMS
,
pointer
)
return
dms
@
staticmethod
def
exists
(
object
dms_name
)
:
cdef
bytes
dms_name_b
=
tobytes
(
dms_name
)
...
...
@@ -65,6 +68,7 @@ cdef class DMS(OBIWrapper):
raise
RuntimeError
(
"Error checking if a DMS exists"
)
else
:
return
bool
(
rep
)
@
staticmethod
def
new
(
object
dms_name
)
:
...
...
@@ -114,6 +118,17 @@ cdef class DMS(OBIWrapper):
return
<
bytes
>
self
.
pointer
().
dms_name
# DMS full path property getter
@
property
def
full_path
(
self
)
:
'''
Returns the full path of the DMS directory
@rtype: bytes
'''
return
<
bytes
>
self
.
pointer
().
directory_path
# command history DOT graph property getter in the form of a bytes string
@
property
def
dot_history_graph
(
self
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment