MCPcopy Create free account
hub / github.com/PyTables/PyTables / rename_node

Method rename_node

tables/file.py:1828–1850  ·  view source on GitHub ↗

Change the name of the node specified by where and name to newname. Parameters ---------- where, name These arguments work as in :meth:`File.get_node`, referencing the node to be acted upon. newname : str The new name to be assigne

(
        self,
        where: Node | str,
        newname: str,
        name: str | None = None,
        overwrite: bool = False,
    )

Source from the content-addressed store, hash-verified

1826 return self.get_node(path)._f_isvisible()
1827
1828 def rename_node(
1829 self,
1830 where: Node | str,
1831 newname: str,
1832 name: str | None = None,
1833 overwrite: bool = False,
1834 ) -> None:
1835 """Change the name of the node specified by where and name to newname.
1836
1837 Parameters
1838 ----------
1839 where, name
1840 These arguments work as in
1841 :meth:`File.get_node`, referencing the node to be acted upon.
1842 newname : str
1843 The new name to be assigned to the node (a string).
1844 overwrite : bool
1845 Whether to recursively remove a node with the same
1846 newname if it already exists (not done by default).
1847
1848 """
1849 obj = self.get_node(where, name=name)
1850 obj._f_rename(newname, overwrite)
1851
1852 def move_node(
1853 self,

Callers 15

_g_update_locationMethod · 0.45
test07_renameLeafMethod · 0.45
test07b_renameLeafMethod · 0.45
test07c_renameLeafMethod · 0.45
test07d_renameLeafMethod · 0.45
test09_renameGroupMethod · 0.45
test09b_renameGroupMethod · 0.45
test09c_renameGroupMethod · 0.45
test09d_renameGroupMethod · 0.45
test09e_renameGroupMethod · 0.45

Calls 2

get_nodeMethod · 0.95
_f_renameMethod · 0.45

Tested by 15

test07_renameLeafMethod · 0.36
test07b_renameLeafMethod · 0.36
test07c_renameLeafMethod · 0.36
test07d_renameLeafMethod · 0.36
test09_renameGroupMethod · 0.36
test09b_renameGroupMethod · 0.36
test09c_renameGroupMethod · 0.36
test09d_renameGroupMethod · 0.36
test09e_renameGroupMethod · 0.36
test00Method · 0.36