Module: sarpyx.sla.utilis
File: sarpyx/sla/utilis.py
No module docstring available; module purpose is inferred from implementation.
Exported Symbols (__all__)
No explicit __all__ list. Public symbols inferred from implementation.
Public Functions (5)
delete function
Deletes the specified file or directory.
File location: sarpyx/sla/utilis.py:8
Signature
delete(path_to_delete)
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
path_to_delete | inferred from implementation | yes | - | The path to the file or directory to delete. Can be provided as a string or a pathlib.Path object. |
Return Type
inferred from implementation
inferred from implementation.
Exceptions
None explicitly documented; inferred from implementation.
Side Effects
- inferred from implementation
Example Usage
from sarpyx.sla.utilis import delete
result = delete(path_to_delete=<path_to_delete>)
Edge Cases
No explicit edge-case section found; behavior is inferred from implementation.
unzip function
Extracts the contents of a ZIP file to the directory containing the ZIP file.
File location: sarpyx/sla/utilis.py:32
Signature
unzip(path_to_zip_file)
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
path_to_zip_file | inferred from implementation | yes | - | The file path to the ZIP file to be extracted. |
Return Type
inferred from implementation
None
Exceptions
None explicitly documented; inferred from implementation.
Side Effects
- inferred from implementation
Example Usage
from sarpyx.sla.utilis import unzip
result = unzip(path_to_zip_file=<path_to_zip_file>)
Edge Cases
Documented return may be None for some execution paths.
delProd function
Deletes a product file and its associated data folder, while ensuring the last
File location: sarpyx/sla/utilis.py:47
Signature
delProd(prodToDelete)
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
prodToDelete | inferred from implementation | yes | - | The product file to delete. Can be a Path object or a string representing the file path. |
Return Type
inferred from implementation
inferred from implementation.
Exceptions
None explicitly documented; inferred from implementation.
Side Effects
- inferred from implementation
Example Usage
from sarpyx.sla.utilis import delProd
result = delProd(prodToDelete=<prodToDelete>)
Edge Cases
No explicit edge-case section found; behavior is inferred from implementation.
command_line function
Executes a shell command provided as a string and prints its output.
File location: sarpyx/sla/utilis.py:68
Signature
command_line(cmd: str)
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
cmd | str | yes | - | The shell command to execute. The command should be provided as a single string, with arguments separated by spaces. |
Return Type
inferred from implementation
inferred from implementation.
Exceptions
None explicitly documented; inferred from implementation.
Side Effects
- io
- subprocess
Example Usage
from sarpyx.sla.utilis import command_line
result = command_line(cmd=<cmd>)
Edge Cases
No explicit edge-case section found; behavior is inferred from implementation.
iterNodes function
Recursively iterates through the children of an XML element tree and populates a dictionary
File location: sarpyx/sla/utilis.py:88
Signature
iterNodes(root, Val_Dict: dict)
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
root | inferred from implementation | yes | - | The root element of the XML tree to iterate through. |
Val_Dict | dict | yes | - | A dictionary to store the tags and text values of the leaf nodes. |
Return Type
inferred from implementation
dict: The updated dictionary containing tags as keys and their corresponding text values as values from the leaf nodes of the XML tree.
Exceptions
None explicitly documented; inferred from implementation.
Side Effects
- inferred from implementation
Example Usage
from sarpyx.sla.utilis import iterNodes
result = iterNodes(root=<root>, Val_Dict=<Val_Dict>)
Edge Cases
No explicit edge-case section found; behavior is inferred from implementation.
Public Classes (0)
No public classes detected.