MCPcopy Create free account
hub / github.com/enthought/apptools / split_path

Method split_path

apptools/io/h5/file.py:328–342  ·  view source on GitHub ↗

Split node path returning the base path and node name. For example: '/path/to/node' will return '/path/to' and 'node' Parameters ---------- node_path : str PyTable node path; e.g. '/path/to/node'.

(cls, node_path)

Source from the content-addressed store, hash-verified

326
327 @classmethod
328 def split_path(cls, node_path):
329 """Split node path returning the base path and node name.
330
331 For example: '/path/to/node' will return '/path/to' and 'node'
332
333 Parameters
334 ----------
335 node_path : str
336 PyTable node path; e.g. '/path/to/node'.
337 """
338 i = node_path.rfind("/")
339 if i == 0:
340 return "/", node_path[1:]
341 else:
342 return node_path[:i], node_path[i + 1:]
343
344 @classmethod
345 def join_path(cls, *args):

Callers 6

create_arrayMethod · 0.95
create_groupMethod · 0.95
_check_nodeMethod · 0.95
_create_pytables_nodeMethod · 0.80
test_split_pathMethod · 0.80

Calls

no outgoing calls

Tested by 1

test_split_pathMethod · 0.64