String

class pyarts3.arts.String(*args, **kwargs)

Basic string type

Workspace methods that require String

Overview

Method

readxml()

Read variable from file.

Method

savexml()

Saves variable to file.

Static Method

fromxml()

Create variable from file.

Operator

__add__()

__add__(self, arg: object, /) -> object

Operator

__and__()

__and__(self, arg: object, /) -> object

Operator

__divmod__()

__divmod__(self, arg: object, /) -> object

Operator

__eq__()

__eq__(self, arg: object, /) -> object

Operator

__floordiv__()

__floordiv__(self, arg: object, /) -> object

Operator

__format__()

__format__(self, arg: str, /) -> str

Operator

__ge__()

__ge__(self, arg: object, /) -> object

Operator

__getitem__()

Get item from string

Operator

__getstate__()

__getstate__(self) -> tuple[str]

Operator

__gt__()

__gt__(self, arg: object, /) -> object

Operator

__hash__()

Allows hashing

Operator

__init__()

__init__(self, arg: bytes, /) -> None

Operator

__le__()

__le__(self, arg: object, /) -> object

Operator

__len__()

Length of the string

Operator

__lt__()

__lt__(self, arg: object, /) -> object

Operator

__matmul__()

__matmul__(self, arg: object, /) -> object

Operator

__mod__()

__mod__(self, arg: object, /) -> object

Operator

__mul__()

__mul__(self, arg: object, /) -> object

Operator

__ne__()

__ne__(self, arg: object, /) -> object

Operator

__or__()

__or__(self, arg: object, /) -> object

Operator

__pow__()

__pow__(self, arg: object, /) -> object

Operator

__radd__()

__radd__(self, arg: object, /) -> object

Operator

__rand__()

__rand__(self, arg: object, /) -> object

Operator

__rdivmod__()

__rdivmod__(self, arg: object, /) -> object

Operator

__repr__()

__repr__(self) -> str

Operator

__rfloordiv__()

__rfloordiv__(self, arg: object, /) -> object

Operator

__rmatmul__()

__rmatmul__(self, arg: object, /) -> object

Operator

__rmod__()

__rmod__(self, arg: object, /) -> object

Operator

__rmul__()

__rmul__(self, arg: object, /) -> object

Operator

__ror__()

__ror__(self, arg: object, /) -> object

Operator

__rpow__()

__rpow__(self, arg: object, /) -> object

Operator

__rsub__()

__rsub__(self, arg: object, /) -> object

Operator

__rtruediv__()

__rtruediv__(self, arg: object, /) -> object

Operator

__setstate__()

__setstate__(self, arg: tuple[str], /) -> None

Operator

__str__()

__str__(self) -> str

Operator

__truediv__()

__truediv__(self, arg: object, /) -> object

Constructors

__init__(self) None
__init__(self, arg: str, /) None
__init__(self, arg: pyarts3.arts.String) None
__init__(self, arg: bytes, /) None

Methods

readxml(self, file: str) str

Read variable from file.

Parameters:

file (str) – A file that can be read.

Raises:

RuntimeError – For any failure to read.

Returns:

file – The file path found (may differ from input due to environment variables).

Return type:

str

savexml(self, file: str, type: str = 'ascii', clobber: bool = True) str

Saves variable to file.

Parameters:
  • file (str) – The path to which the file is written. Note that several of the options might modify the name or write more files.

  • type (str, optional) – Type of file to save. See FileType for options. Defaults is “ascii”.

  • clobber (bool, optional) – Overwrite existing files or add new file with modified name? Defaults is True.

Raises:

RuntimeError – For any failure to write.

Returns:

file – The file saved. May differ from input.

Return type:

str

Static Methods

fromxml(file: str) pyarts3.arts.String

Create variable from file.

Parameters:

file (str) – A file that can be read

Raises:

RuntimeError – For any failure to read.

Returns:

artstype – The variable created from the file.

Return type:

T

Operators

__add__(self, arg: pyarts3.arts.String, /) object
__add__(self, arg: object, /) object
__and__(self, arg: pyarts3.arts.String, /) object
__and__(self, arg: object, /) object
__divmod__(self, arg: pyarts3.arts.String, /) object
__divmod__(self, arg: object, /) object
__eq__(self, arg: pyarts3.arts.String, /) object
__eq__(self, arg: object, /) object
__floordiv__(self, arg: pyarts3.arts.String, /) object
__floordiv__(self, arg: object, /) object
__format__(self, arg: str, /) str
__ge__(self, arg: pyarts3.arts.String, /) object
__ge__(self, arg: object, /) object
__getitem__(self, arg: object, /) object

Get item from string

__getstate__(self) tuple[str]
__gt__(self, arg: pyarts3.arts.String, /) object
__gt__(self, arg: object, /) object
__hash__(self) int

Allows hashing

__init__(self) None
__init__(self, arg: str, /) None
__init__(self, arg: pyarts3.arts.String) None
__init__(self, arg: bytes, /) None
__le__(self, arg: pyarts3.arts.String, /) object
__le__(self, arg: object, /) object
__len__(self) int

Length of the string

__lt__(self, arg: pyarts3.arts.String, /) object
__lt__(self, arg: object, /) object
__matmul__(self, arg: pyarts3.arts.String, /) object
__matmul__(self, arg: object, /) object
__mod__(self, arg: pyarts3.arts.String, /) object
__mod__(self, arg: object, /) object
__mul__(self, arg: pyarts3.arts.String, /) object
__mul__(self, arg: object, /) object
__ne__(self, arg: pyarts3.arts.String, /) object
__ne__(self, arg: object, /) object
__or__(self, arg: pyarts3.arts.String, /) object
__or__(self, arg: object, /) object
__pow__(self, arg: pyarts3.arts.String, /) object
__pow__(self, arg: object, /) object
__radd__(self, arg: pyarts3.arts.String, /) object
__radd__(self, arg: object, /) object
__rand__(self, arg: pyarts3.arts.String, /) object
__rand__(self, arg: object, /) object
__rdivmod__(self, arg: pyarts3.arts.String, /) object
__rdivmod__(self, arg: object, /) object
__repr__(self) str
__rfloordiv__(self, arg: pyarts3.arts.String, /) object
__rfloordiv__(self, arg: object, /) object
__rmatmul__(self, arg: pyarts3.arts.String, /) object
__rmatmul__(self, arg: object, /) object
__rmod__(self, arg: pyarts3.arts.String, /) object
__rmod__(self, arg: object, /) object
__rmul__(self, arg: pyarts3.arts.String, /) object
__rmul__(self, arg: object, /) object
__ror__(self, arg: pyarts3.arts.String, /) object
__ror__(self, arg: object, /) object
__rpow__(self, arg: pyarts3.arts.String, /) object
__rpow__(self, arg: object, /) object
__rsub__(self, arg: pyarts3.arts.String, /) object
__rsub__(self, arg: object, /) object
__rtruediv__(self, arg: pyarts3.arts.String, /) object
__rtruediv__(self, arg: object, /) object
__setstate__(self, arg: tuple[str], /) None
__str__(self) str
__truediv__(self, arg: pyarts3.arts.String, /) object
__truediv__(self, arg: object, /) object