ArrayOfString

class pyarts.arts.ArrayOfString(*args, **kwargs)

A list of String

Workspace methods that can generate ArrayOfString

Workspace methods that require ArrayOfString

Overview

Method

append()

Append arg to the end of the list.

Method

clear()

Remove all items from list.

Method

count()

Return number of occurrences of arg.

Method

extend()

Extend self by appending elements from arg.

Method

index()

Return first occurence of value between start and end - defaults to full range

Method

insert()

Insert object arg1 before index arg0.

Method

pop()

Remove and return item at index (default last).

Method

readxml()

Read variable from file

Method

remove()

Remove first occurrence of arg.

Method

savexml()

Saves variable to file

Static Method

fromxml()

Create variable from file

Operator

__contains__()

Overloaded function.

Operator

__delitem__()

Overloaded function.

Operator

__eq__()

self == other

Operator

__ge__()

Return self>=value.

Operator

__getitem__()

Overloaded function.

Operator

__gt__()

Return self>value.

Operator

__hash__()

Return hash(self).

Operator

__iter__()

Allows iter(self)

Operator

__le__()

Return self<=value.

Operator

__len__()

Return the number of items in the list.

Operator

__lt__()

Return self<value.

Operator

__ne__()

self != other

Operator

__setitem__()

Overloaded function.

Constructors

__init__(self) None
__init__(self, arg: pyarts.arts.ArrayOfString) None
__init__(self, arg: collections.abc.Iterable[pyarts.arts.String], /) None
__init__(self) None
__init__(self, arg: pyarts.arts.ArrayOfString) None

Overloaded function.

  1. __init__(self) -> None

Default constructor

  1. __init__(self, arg: pyarts.arts.ArrayOfString) -> None

Copy constructor

  1. __init__(self, arg: collections.abc.Iterable[pyarts.arts.String], /) -> None

Construct from an iterable object

Methods

append(self, value: str) None

Append arg to the end of the list.

clear(self) None

Remove all items from list.

count(self, arg: str, /) int

Return number of occurrences of arg.

extend(self, arg: pyarts.arts.ArrayOfString, /) None

Extend self by appending elements from arg.

index(self, value: str, start: int = 0, end: int = 18446744073709551615) int

Return first occurence of value between start and end - defaults to full range

insert(self, arg0: int, arg1: str, /) None

Insert object arg1 before index arg0.

pop(self, index: int = -1) str

Remove and return item at index (default last).

readxml(self, file: str) None

Read variable from file

Parameters:

file (str) – A file that can be read

On Error:

Throws RuntimeError for any failure to read

remove(self, arg: str, /) None

Remove first occurrence of arg.

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

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) – Type of file to save (ascii. zascii, or binary)

  • clobber (bool) – Overwrite existing files or add new file with modified name?

On Error:

Throws RuntimeError for any failure to save

Static Methods

fromxml(file: str) pyarts.arts.ArrayOfString

Create variable from file

Parameters:

file (str) – A file that can be read

On Error:

Throws RuntimeError for any failure to read

Operators

__contains__(self, arg: str, /) bool
__contains__(self, arg: object, /) bool

Overloaded function.

  1. __contains__(self, arg: str, /) -> bool

Return true if arg is in the list.

  1. __contains__(self, arg: object, /) -> bool

Return false.

__delitem__(self, i: int) None
__delitem__(self, slice: slice) None

Overloaded function.

  1. __delitem__(self, i: int) -> None

Remove the i-th item from the list.

  1. __delitem__(self, slice: slice) -> None

Remove a slice of the list.

__eq__(self, arg: pyarts.arts.ArrayOfString, /) bool

self == other

__ge__(value, /)

Return self>=value.

__getitem__(self, i: int) str
__getitem__(self, slice: slice) pyarts.arts.ArrayOfString

Overloaded function.

  1. __getitem__(self, i: int) -> str

Return the i-th item.

  1. __getitem__(self, slice: slice) -> pyarts.arts.ArrayOfString

Return a slice of the list.

__gt__(value, /)

Return self>value.

__hash__()

Return hash(self).

__iter__(self) collections.abc.Iterator[str]

Allows iter(self)

__le__(value, /)

Return self<=value.

__len__(self) int

Return the number of items in the list.

__lt__(value, /)

Return self<value.

__ne__(self, arg: pyarts.arts.ArrayOfString, /) bool

self != other

__setitem__(self, i: int, value: str) None
__setitem__(self, slice: slice, value: pyarts.arts.ArrayOfString) None

Overloaded function.

  1. __setitem__(self, i: int, value: str) -> None

Set the i-th item to value.

  1. __setitem__(self, slice: slice, value: pyarts.arts.ArrayOfString) -> None

Set a slice of the list.